useful-stuff

A place to keep all those useful code snippets, links etc

View project on GitHub

Postgres commands


# List databases with \l 
postgres=# \l

# Switch databse with \c
postgres=# \c corda

# List tables with \dt
postgres=# \dt

# List users with \du
postgres=# \du
postgres=# \du+

# To change a password
ALTER USER yourusername WITH PASSWORD 'yournewpass';