diff options
author | Michael Paquier | 2025-04-19 23:34:38 +0000 |
---|---|---|
committer | Michael Paquier | 2025-04-19 23:34:38 +0000 |
commit | 78231baaf967166776de8262072acb8d589d3b6a (patch) | |
tree | f48c3632e68ae6fb8ae444f39db55fa74a31a626 | |
parent | 5743d122fcf35edba801609fcde7410610ed0f19 (diff) |
psql: Split extended query protocol meta-commands in --help=commands
Compared to v17 with only \bind able to do extended query protocol work,
v18 has now a total of 11 meta-commands related to the extended query
protocol. These were all listed under the "General" section of the
--help=commands output and are specialized, bloating the output
generated.
All these meta-commands are moved into a new section called "Extended
Query Protocol", listed at the end of --help=commands.
This split has been suggested by Noah Misch.
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | src/bin/psql/help.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 8c917e61f49..403b51325a7 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -161,29 +161,16 @@ slashUsage(unsigned short int pager) initPQExpBuffer(&buf); HELP0("General\n"); - HELP0(" \\bind [PARAM]... set query parameters\n"); - HELP0(" \\bind_named STMT_NAME [PARAM]...\n" - " set query parameters for an existing prepared statement\n"); - HELP0(" \\close STMT_NAME close an existing prepared statement\n"); HELP0(" \\copyright show PostgreSQL usage and distribution terms\n"); HELP0(" \\crosstabview [COLUMNS] execute query and display result in crosstab\n"); - HELP0(" \\endpipeline exit pipeline mode\n"); HELP0(" \\errverbose show most recent error message at maximum verbosity\n"); - HELP0(" \\flush flush output data to the server\n"); - HELP0(" \\flushrequest send request to the server to flush its output buffer\n"); HELP0(" \\g [(OPTIONS)] [FILE] execute query (and send result to file or |pipe);\n" " \\g with no arguments is equivalent to a semicolon\n"); HELP0(" \\gdesc describe result of query, without executing it\n"); - HELP0(" \\getresults [NUM_RES] read NUM_RES pending results. All pending results are\n" - " read if no argument is provided\n"); HELP0(" \\gexec execute query, then execute each value in its result\n"); HELP0(" \\gset [PREFIX] execute query and store result in psql variables\n"); HELP0(" \\gx [(OPTIONS)] [FILE] as \\g, but forces expanded output mode\n"); - HELP0(" \\parse STMT_NAME create a prepared statement\n"); HELP0(" \\q quit psql\n"); - HELP0(" \\sendpipeline send an extended query to an ongoing pipeline\n"); - HELP0(" \\startpipeline enter pipeline mode\n"); - HELP0(" \\syncpipeline add a synchronisation point to an ongoing pipeline\n"); HELP0(" \\watch [[i=]SEC] [c=N] [m=MIN]\n" " execute query every SEC seconds, up to N times,\n" " stop if less than MIN rows are returned\n"); @@ -337,6 +324,22 @@ slashUsage(unsigned short int pager) HELP0(" \\prompt [TEXT] NAME prompt user to set internal variable\n"); HELP0(" \\set [NAME [VALUE]] set internal variable, or list all if no parameters\n"); HELP0(" \\unset NAME unset (delete) internal variable\n"); + HELP0("\n"); + + HELP0("Extended Query Protocol\n"); + HELP0(" \\bind [PARAM]... set query parameters\n"); + HELP0(" \\bind_named STMT_NAME [PARAM]...\n" + " set query parameters for an existing prepared statement\n"); + HELP0(" \\close STMT_NAME close an existing prepared statement\n"); + HELP0(" \\endpipeline exit pipeline mode\n"); + HELP0(" \\flush flush output data to the server\n"); + HELP0(" \\flushrequest send request to the server to flush its output buffer\n"); + HELP0(" \\getresults [NUM_RES] read NUM_RES pending results. All pending results are\n" + " read if no argument is provided\n"); + HELP0(" \\parse STMT_NAME create a prepared statement\n"); + HELP0(" \\sendpipeline send an extended query to an ongoing pipeline\n"); + HELP0(" \\startpipeline enter pipeline mode\n"); + HELP0(" \\syncpipeline add a synchronisation point to an ongoing pipeline\n"); /* Now we can count the lines. */ nlcount = 0; |