login as: root
root@192.168.0.130's password:
Last login: Mon Dec 7 20:19:14 2009 from 192.168.0.183
[root@NameNode ~]# su postgres
bash-3.2$ ntsysv
You must be root to run ntsysv.
bash-3.2$ exit
exit
[root@NameNode ~]# ntsysv
[root@NameNode ~]# su postgresq
su: user postgresq does not exist
[root@NameNode ~]# su postgres
bash-3.2$ createdb telkomsel
could not change directory to "/root"
CREATE DATABASE
bash-3.2$ exit
exit
[root@NameNode ~]# psql -U postgres -d telkomsel -h 192.168.0.130
Welcome to psql 8.1.18, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
telkomsel=# create table NetworkElement (Name varchar(32), regionId smallint, typesId smallint, vendorId smallint, releaseId smallint, remark varchar(64), Primary Key (name));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "networkelement_pkey" for table "networkelement"
CREATE TABLE
telkomsel=# show tables;
ERROR: unrecognized configuration parameter "tables"
telkomsel=# show tables;
ERROR: unrecognized configuration parameter "tables"
telkomsel=# show table
telkomsel-# show tables;
ERROR: syntax error at or near "table" at character 6
LINE 1: show table
^
telkomsel=# SELECT * From NetworkElement;
name | regionid | typesid | vendorid | releaseid | remark
------+----------+---------+----------+-----------+--------
(0 rows)
telkomsel=#
No comments:
Post a Comment