Полезная информация

next up previous contents index
Next: PSQL command-line arguments Up: Interfacing to the POSTGRESQL Previous: Controlling Query Buffer

Additional PSQL Commands

You can generate a variety of information about the current database from psql. Table [*] summarizes them. See the psql manual page for a full description of each item.

 
Table: psql listing commands
Listing Type psql Command
All tables \dt
A single table \d tablename
A single index \d indexname
Indexes \di
Tables and indexes \d
Functions \df
Operators \do
Aggregates \da
Sequences \ds
System tables \dS
Comments \dd object
Databases \l
Grant permissions \z


You can generate a control the way psql displays output. Table [*] summarizes them. See the psql manual page for a full description of each item.
 
Table: psql output commands
Modifies psql Command
Field alignment \a
Field separator \f separator
Expanded output \x
No table headings or row count \t
Compatibility display \m
Enable HTML \H
HTML3 options \T html
HTML caption \C caption


You can access special psql capabilities. Table [*] summarizes them. See the psql manual page for a full description of each item.
 
Table: psql special capabilities
Capability psql Command
Connect to another database \connect dbname
Copy datafile into database \copy tablename to|from filename



next up previous contents index
Next: PSQL command-line arguments Up: Interfacing to the POSTGRESQL Previous: Controlling Query Buffer
Bruce Momjian
1999-11-21