[commands] show help on backslash commands \? options show help on psql command-line options \? variables show help on special variables \h [NAME] help on syntax of SQL commands, * for all commandsQuery Buffer \e [FILE] [LINE] edit the query buffer (or file) with...
在上面的pg_dump命令中,-f output_file.sql已经指定了输出文件的路径和名称。你可以根据需要修改这个文件路径和名称。 确认导出完成并检查SQL文件内容: 导出完成后,你应该能在指定的路径下找到生成的SQL文件。使用文本编辑器打开这个文件,你可以查看其内容,确保导出的数据正确无误。 此外,如果你更喜欢在psql命令行界...
\s [FILE] display history or save it tofile\wFILEwritequery buffer tofileInput/Output \copy ... perform SQL COPY with data stream to the client host \echo[-n] [STRING]writestringto standard output (-nforno newline) \i FILE execute commands fromfile\ir FILE as \i, but relative to ...
postgres=# \? General \copyright show PostgreSQL usage and distribution terms \crosstabview [COLUMNS] execute query and display result in crosstab \errverbose show most recent error message at maximum verbosity \g [(OPTIONS)] [FILE] execute query (and send result to file or |pipe); \g with...
set psql variable NAME to VALUE (e.g., -v ON_ERROR_STOP=1) -V, --version output version information, then exit -X, --no-psqlrc do not read startup file (~/.psqlrc) -1 ("one"), --single-transaction execute as a single transaction (if non-interactive) ...
--output=filename 将所有查询输出重定向到文件filename。这个选项等效于\o命令。 -p port--port=port 指定服务器侦听的TCP端口或本地Unix域套接字文件的扩展。缺省使用环境变量PGPORT的值,如果没有设置的话则使用编译时声明的端口(通常是 5432)。 -P assignment--pset=assignment 以\pset的风格设置打印选项。
-o filename --output filename 将所有查询输出定向到文件 filename。这个选项等效于命令 \o。 -p port --port port 声明被服务器侦听的 TCP 端口或使用的缺省本地 Unix 主控套接字文件句柄。 缺省的是环境变量PGPORT的值,如果没有设置的话是编译是声明的端口,通常是 5432。 -P assignment --pset ...
set psql variable NAME to VALUE (e.g., -v ON_ERROR_STOP=1) -V, --version output version information, then exit -X, --no-psqlrc do not read startup file (~/.psqlrc) -1 ("one"), --single-transaction execute as a single transaction (if non-interactive) ...
-o filename --output filename 将所有查询输出定向到文件 filename。这个选项等效于命令 \o。 AI代码助手复制代码 -p port --port port 声明被服务器侦听的TCP端口或使用的缺省本地Unix主控套接字文件句柄。缺省的是环境变量PGPORT的值,如果没有设置的话是编译是声明的端口,通常是5432。
\gx[(OPTIONS)][FILE]as \g,but forces expanded output mode \q quit psql \watch[SEC]execute query every SEC seconds Help \?[commands]show help on backslash commands \?options show help on psql command-line options \?variables show help on special variables ...