Skip to content

Instantly share code, notes, and snippets.

@vishwajeetio
Last active June 9, 2020 23:09
Show Gist options
  • Save vishwajeetio/efee3ae47d555337750cb033c9454bba to your computer and use it in GitHub Desktop.
Save vishwajeetio/efee3ae47d555337750cb033c9454bba to your computer and use it in GitHub Desktop.

In this space I will write some basic commands on dealing with postgresql install on docker.

  1. Connet to postgres docker container for psql commands:

    docker exec -it Name or id psql -U postgres_username

  2. list databases:

    \l

  3. switch between databases:

    \c database_name

  4. list of tables:

    \dt

  5. description about table:

    \d+ table_name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment