About 6,920,000 results
Open links in new tab
  1. How to exit from PostgreSQL command line utility: psql

    Oct 18, 2016 · What command or short key can I use to exit the PostgreSQL command line utility psql?

  2. How to show data in a table by using psql command line interface?

    Mar 26, 2020 · 215 Is there a way to show all the content inside a table by using psql command line interface? I can use \list to show all the databases, \d to show all the tables, but how can I show all …

  3. How do I specify a password to 'psql' non-interactively?

    Sep 15, 2021 · If its not too late to add most of the options in one answer: There are a couple of options: set it in the pgpass file. link set an environment variable and get it from there: export …

  4. PostgreSQL: Remotely connecting to Postgres instance using psql …

    I want to remotely connect to a Postgres instance. I know we can do this using the psql command passing the hostname I tried the following: psql -U postgres -p 5432 -h hostname I modified the /etc/

  5. How do you use script variables in psql? - Stack Overflow

    @alphabetasoup Yep, you can use psql -f - etc. Like many things, psql isn't exactly pretty, but it gets the job done. It's easier to use -v than to compose a \set command in stdin though.

  6. How to list the tables of schemas in PostgreSQL? - Stack Overflow

    Mar 26, 2013 · When I do a \\dt in psql I only get a listing of tables in the current schema (public by default). How can I get a list of all tables in all schemas or a particular schema?

  7. Run PostgreSQL queries from the command line - Stack Overflow

    Jul 17, 2025 · psql -U username -d mydatabase -c 'SELECT * FROM mytable' If you're new to postgresql and unfamiliar with using the command line tool psql then there is some confusing …

  8. database - How to show tables in PostgreSQL? - Stack Overflow

    psql -U postgres psql --username=postgres 2. Show tables Now in Psql you could run commands such as: \? list all the commands \l list databases \conninfo display information about current connection \c …

  9. Using psql to connect to PostgreSQL in SSL mode [closed]

    I am trying to configure ssl certificate for PostgreSQL server. I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SSL to "on" to

  10. How to execute multiple queries using psql command from bash shell?

    Mar 2, 2015 · I need to execute postgresql queries from command line using psql -c command. For every psql command, it opens a new tcp connection to connect to the database server and execute …