public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: Improve plpgsql's error messages for incorrect %TYPE and %ROWTYP
Date: Wed, 28 Feb 2024 21:05:53 +0000
Message-ID: <[email protected]> (raw)
Improve plpgsql's error messages for incorrect %TYPE and %ROWTYPE.
If one of these constructs referenced a nonexistent object, we'd fall
through to feeding the whole construct to the core parser, which would
reject it with a "syntax error" message. That's pretty unhelpful and
misleading. There's no good reason for plpgsql_parse_wordtype and
friends not to throw a useful error for incorrect input, so make them
do that instead of returning NULL.
Discussion: https://postgr.es/m/[email protected]
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2a6b47cb50eb9b62b050de2cddd03a9ac267e61f
Modified Files
--------------
src/pl/plpgsql/src/expected/plpgsql_misc.out | 36 ++++++++++++
src/pl/plpgsql/src/pl_comp.c | 82 ++++++++++------------------
src/pl/plpgsql/src/pl_gram.y | 5 +-
src/pl/plpgsql/src/sql/plpgsql_misc.sql | 17 ++++++
4 files changed, 83 insertions(+), 57 deletions(-)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Improve plpgsql's error messages for incorrect %TYPE and %ROWTYP
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox