Allow noise semicolons ending psql \sf, \ef, \sv, \ev commands.
authorTom Lane <[email protected]>
Wed, 10 Jan 2024 19:20:09 +0000 (14:20 -0500)
committerTom Lane <[email protected]>
Wed, 10 Jan 2024 19:20:09 +0000 (14:20 -0500)
commit390298f0806588ceb131dd47760208bd2cd6298f
treebbf4288f085b0143941dda3d08e1455339365b3b
parentadd673b897c3d76767cec5ac1619fad6b1eb7582
Allow noise semicolons ending psql \sf, \ef, \sv, \ev commands.

Many psql backslash commands tolerate trailing semicolons, even
though that's not part of the official syntax.  These did not.
They tried to, by passing semicolon = true to psql_scan_slash_option,
but that function ignored this parameter in OT_WHOLE_LINE mode.
Teach it to do the right thing, and remove the now-duplicative
logic in exec_command_help.

Discussion: https://postgr.es/m/2012251.1704746912@sss.pgh.pa.us
src/bin/psql/command.c
src/bin/psql/psqlscanslash.l
src/test/regress/expected/psql.out
src/test/regress/sql/psql.sql