From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Improve plpgsql's error messages for incorrect %TYPE and %ROWTYP |
Date: | 2024-02-28 21:05:53 |
Message-ID: | E1rfR7h-001Hcj-Ah@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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/1964516.1708977740@sss.pgh.pa.us
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-02-28 22:13:11 | pgsql: Fix documentation comments for test CA config files |
Previous Message | Nathan Bossart | 2024-02-28 20:56:06 | pgsql: Convert README to Markdown. |