postgres=# show password_encryption; password_encryption --- md5 (1 row) postgres=# select * from pg_shadow where usename='test'; usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | usec onfig ---+---+---+---+---+---+---+---+--...
\c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo} 连线到新的资料库 (目前是 "test") \encoding [ENCODING] 显示或设定用户端字元编码 \password [USERNAME] 修改用户密码 \conninfo 显示当前的连接信息 Operating System \cd [DIR] 改变目前的工作目录 \setenv NAME [VALUE] 设置或者取消环境...
connect to new database (currently"postgres") \encoding [ENCODING] show or set client encoding \password [USERNAME] securely change the passwordfora user \conninfo display information about current connection Operating System \cd [DIR] change the current working directory \timing [on|off] toggle t...
\x [on|off|auto] 切换扩展输出 (当前默认 off)Connection \c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo} 连线到新的资料库 (目前是 "test") \encoding [ENCODING] 显示或设定用户端字元编码 \password [USERNAME] 修改用户密码 \conninfo 显示当前的连接信息Operating System \cd [DIR] ...
-W--password 强制psql在连接到一个数据库之前提示要求一个口令。 这个选项不是必不可少的,因为如果服务器要求口令认证,psql将自动提示要求一个口令。但是,psql将浪费一次连接尝试来发现服务器想要一个口令。在某些情况下值得用-W来避免额外的连接尝试。 注意这个选项将对整个会话保持设置,并且因此它会影响元命令...
-W, --password force password prompt (should happen automatically) 登录客户端: /data/pgbin12/bin/psql -U stone stone -h /tmp/ -p 15432 -H HTML psql (12.8stone pg12) Type "help" for help. psql帮助命令: Help \? [commands] show help on backslash commands ...
\errverbose show most recent error message at maximum verbosity \g[(OPTIONS)][FILE]execute query(and send result to file or|pipe);\g with no arguments is equivalent to a semicolon \gdesc describe result of query,without executing it ...
Password for user postgres: #此处必须是交互式输入密码 psql (9.5.7) Type "help" for help. testdb=# \q 这里的-u -p -d选项都可以省略,因为环境变量有所设置! [postgres@hgdb01data]$ cat ~/.bash_profile PATH=$PATH:$HOME/.local/bin:$HOME/bin ...
postgres=# SELECT CURRENT_USER; current_user --- pgxz (1 row) 显示当前连接的schema postgres=# show search_path ; search_path --- "$user",public (1 row) 显示节点参数值 postgres=# show work_mem ; work_mem --- 4MB (1 row) 设置当前连接的运行参数 postgres=# set search_path...
\c[onnect] [DBNAME|- USER|- HOST|- PORT|-] connect to new database (currently "testdb") \encoding [ENCODING] show or set client encoding \password [USERNAME] securely change the password for a user \conninfo display information about current connection Operating System \cd [DIR] change th...