约 51 个结果
在新选项卡中打开链接
  1. How do I specify a password to 'psql' non-interactively?

    2021年9月15日 · 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 …

  2. How to use “psql” to connect to PostgreSQL in SSL mode?

    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

  3. 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/

  4. sql - What is the difference between "psql -c" and "psql -f" when ...

    2019年1月16日 · psql -f create_schema_and_table.sql My questions are: What is the difference between executing queries with "psql -c" and "psql -f"? How can the same result be achieved …

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

    2020年3月26日 · 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 …

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

    2025年7月17日 · 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 …

  7. postgresql - How to switch databases in psql? - Stack Overflow

    2010年10月17日 · 2 You can list all the databases in the psql terminal using \l or \list. To select a database you can use \c dbname or \connect dbname. [INFO] You cannot use this commands in …

  8. postgreSQL - psql \\i : how to execute script in a given path

    psql -f createDB.sql I want the script to call other scripts (separate ones for creating tables, adding constraints, functions etc), like this:

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

    This only works in psql but doesn't work with -c / --command; you have to send the command via stdin or via -f. It won't work in (say) PgAdmin-III too. This substitution happens during input processing in …

  10. PostgreSQL: Why psql can't connect to server? - Stack Overflow

    2019年3月19日 · I typed psql and I get this: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgr...