Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## PSQL
- ```bash
- psql -h <host> -U <username> <dbname>
- ```
- - ```\c <database>```: connect to DB
- - ```\dt *.*```: show tables in all schemas
- - ```\dt <schema>.*```: show tables in specific schema
- ANY (to cast to BIGINT) instead of IN:
- ```bash
- GROUP BY <filed> HAVING <field> IS NULL OR <field> = any(ARRAY[n0, n1 ... nm]::bigint[])
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement