From 390298f0806588ceb131dd47760208bd2cd6298f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 10 Jan 2024 14:20:09 -0500 Subject: 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/test/regress/expected/psql.out | 2 +- src/test/regress/sql/psql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/regress/expected/psql.out b/src/test/regress/expected/psql.out index 5d61e4c7bb9..4f3fd464207 100644 --- a/src/test/regress/expected/psql.out +++ b/src/test/regress/expected/psql.out @@ -5323,7 +5323,7 @@ END LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT COST 1 1 RETURN ($2 + $1) -\sf ts_debug(text) +\sf ts_debug(text); CREATE OR REPLACE FUNCTION pg_catalog.ts_debug(document text, OUT alias text, OUT description text, OUT token text, OUT dictionaries regdictionary[], OUT dictionary regdictionary, OUT lexemes text[]) RETURNS SETOF record LANGUAGE sql diff --git a/src/test/regress/sql/psql.sql b/src/test/regress/sql/psql.sql index f199d624d3b..c997106b9f3 100644 --- a/src/test/regress/sql/psql.sql +++ b/src/test/regress/sql/psql.sql @@ -1315,7 +1315,7 @@ drop role regress_psql_user; \sf information_schema._pg_index_position \sf+ information_schema._pg_index_position \sf+ interval_pl_time -\sf ts_debug(text) +\sf ts_debug(text); \sf+ ts_debug(text) -- AUTOCOMMIT -- cgit v1.2.3