diff --git a/postgresql.md b/postgresql.md index 3b5699ed3..f82e829ad 100644 --- a/postgresql.md +++ b/postgresql.md @@ -2,15 +2,21 @@ title: PostgreSQL --- +Replace anything within `` accordingly + ### Console - $ psql + $ psql #logs in to default database & default user + $ sudo -u psql #logs in with a particular user ### Commands + * Show roles: `\du` * Show tables: `\dt` * Show databases: `\l` - * Show columns of a table: `\d table` or `\d+ table` + * Connect to a database: `\c ` + * Show columns of a table: `\d ` or `\d+
` + * Quit: `\q` ### Creating database