postgres:postgresql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
postgres:postgresql [2009/04/06 08:11] – deva | postgres:postgresql [2010/06/01 11:02] – deva | ||
---|---|---|---|
Line 2: | Line 2: | ||
=====Open sql cli interface====== | =====Open sql cli interface====== | ||
< | < | ||
- | psql -U [username] -W [password] | + | psql -U [username] -W [database] |
</ | </ | ||
Line 18: | Line 18: | ||
=====Import/ | =====Import/ | ||
< | < | ||
- | psql -U [username] -W [password] < dump.sql | + | psql -U [username] -W [dbname] < dump.sql |
pg_dump -U [username] -h localhost [-t [table]] [dbname] > dump.sql | pg_dump -U [username] -h localhost [-t [table]] [dbname] > dump.sql | ||
+ | </ | ||
+ | |||
+ | =====Cut prefix from table===== | ||
+ | < | ||
+ | ALTER TABLE data ALTER COLUMN filename TYPE character varying(255) USING substring(filename from 20); | ||
</ | </ |
postgres/postgresql.txt · Last modified: 2011/01/25 07:44 by deva