From d9a9f4b4b92ad39e3c4e6600dc61d5603ddd6e24 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 29 Apr 2021 09:04:31 +0200 Subject: [PATCH] psql: Fix line continuation prompts for unbalanced parentheses This was broken by a silly mistake in e717a9a18b2e34c9c40e5259ad4d31cd7e420750. Reported-by: Jeff Janes Author: Justin Pryzby Discussion: https://www.postgresql.org/message-id/CAMkU=1zKGWEJdBbYKw7Tn7cJmYR_UjgdcXTPDqJj=dNwCETBCQ@mail.gmail.com --- src/fe_utils/psqlscan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe_utils/psqlscan.l b/src/fe_utils/psqlscan.l index 991b7de0b55..0fab48a3825 100644 --- a/src/fe_utils/psqlscan.l +++ b/src/fe_utils/psqlscan.l @@ -1106,7 +1106,7 @@ psql_scan(PsqlScanState state, result = PSCAN_INCOMPLETE; *prompt = PROMPT_PAREN; } - if (state->begin_depth > 0) + else if (state->begin_depth > 0) { result = PSCAN_INCOMPLETE; *prompt = PROMPT_CONTINUE; -- 2.39.5