From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: plpgsql: report proper line number for errors in variable initia
Date: Sun, 31 Oct 2021 16:43:56 +0000
Message-ID: <E1mhDw4-0000Yz-NW@gemulon.postgresql.org> (raw)
plpgsql: report proper line number for errors in variable initialization.
Previously, we pointed at the surrounding block's BEGIN keyword.
If there are multiple variables being initialized in a DECLARE section,
this isn't good enough: it can be quite confusing and unhelpful.
We do know where the variable's declaration started, so it just takes
a tiny bit more error-reporting infrastructure to use that.
Discussion: https://postgr.es/m/713975.1635530414@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/acb2d7d5d2301f07d5857ee252995e62ce9e7055
Modified Files
--------------
src/pl/plpgsql/src/expected/plpgsql_domain.out | 14 +++++-----
src/pl/plpgsql/src/expected/plpgsql_varprops.out | 22 +++++++--------
src/pl/plpgsql/src/pl_exec.c | 35 ++++++++++++++++++------
src/pl/plpgsql/src/plpgsql.h | 1 +
src/test/regress/expected/domain.out | 4 +--
src/test/regress/expected/plpgsql.out | 4 +--
6 files changed, 49 insertions(+), 31 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: plpgsql: report proper line number for errors in variable initia
In-Reply-To: <E1mhDw4-0000Yz-NW@gemulon.postgresql.org>
References: <E1mhDw4-0000Yz-NW@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox