Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. ## PSQL
  2.  
  3. ```bash
  4. psql -h <host> -U <username> <dbname>
  5. ```
  6.  
  7. - ```\c <database>```: connect to DB
  8. - ```\dt *.*```: show tables in all schemas
  9. - ```\dt <schema>.*```: show tables in specific schema
  10.  
  11. ANY (to cast to BIGINT) instead of IN:
  12. ```bash
  13. GROUP BY <filed> HAVING <field> IS NULL OR <field> = any(ARRAY[n0, n1 ... nm]::bigint[])
  14. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement