获取帮助
操作步骤
连接数据库时,可以使用如下命令获取帮助信息。
gsql --help
显示如下帮助信息:
...... Usage: gsql [OPTION]... [DBNAME [USERNAME]] General options: -c, --command=COMMAND run only single command (SQL or internal) and exit -d, --dbname=DBNAME database name to connect to (default: "omm") -f, --file=FILENAME execute commands from file, then exit ......
连接到数据库后,可以使用如下命令获取帮助信息。
help
显示如下帮助信息:
You are using gsql, the command-line interface to gaussdb. Type: \copyright for distribution terms \h for help with SQL commands \? for help with gsql commands \g or terminate with semicolon to execute query \q to quit
任务示例
使用如下命令连接数据库。
gsql -d postgres -p 8000
postgres为需要连接的数据库名称,8000为数据库主节点的端口号。
连接成功后,系统显示类似如下信息:
gsql ((openGauss VxxxRxxxCxx build 290d125f) compiled at 2020-05-08 02:59:43 commit 2143 last mr 131) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help.
查看gsql的帮助信息。具体执行命令请参见表1。
表 1 使用gsql联机帮助
意见反馈