Your cart is currently empty!
PostgreSQL
Connect to psql via console:
sudo -u postgres psql
| Description | Command |
| List database | \list\l |
| List database with extra information | \list+\l+ |
| Connect to a database | \connect <database-name> <username>\c <database-name> <username> |
| List tables | \dt |
| Describe a table | \d |
| Describe a table with extra information | \d+ |
| List schemas | \dn |
| List user and roles | \du |
| List functions | \df |
| List views | \dv |
| Save query result to file | \out <filename>\o <filename> |
| Quit | \quit\q |

Leave a Reply