SHARE
TWEET

Untitled

a guest Apr 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top