PostgreSQL

HomePage | RecentChanges | Preferences

PostgreSQL

 set PGDATA in ~/.bash_profile
 $ touch ~/logs/postgresql.txt
 $ pg_ctl initdb -l ~/logs/postgresql.txt
 $ pg_ctl -l ~/logs/postgresql.txt start

References

=====

Commands

\list
\connect [database_name]
\d
\d [table_name]
\d+ [table_name]

http://www.postgresql.org/docs/9.1/static/sql-altertable.html

DROP DATABASE whatever_dev;

http://www.postgresql.org/docs/8.2/static/sql-dropdatabase.html

select count(*) from transactions;

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited February 13, 2016 5:27 pm by Wendy (diff)
Search: