$ postgres -D /usr/local/var/postgres
$ createdb [dbname]
$ psql -U [username] [dbname]
# create table [tbname](id integer,price integer);
# \d [tbname]
# drop table [tbname];
# alter table [tbname] alter column [clname] type [char(20)];
# alter table [tbname] add type [int];
# grant SELECT, UPDATE, DELETE, INSERT on [tbname] to [username];
# insert into [tbname] values(99,999);
# select * from [tbname]
# update [tbname] set [colname]=[value] where [colname] = [value];
# delete from [tbname];
参考資料