From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andy Fan <zhihuifan1213(at)163(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Better error messages for %TYPE and %ROWTYPE in plpgsql |
Date: | 2024-02-27 02:01:55 |
Message-ID: | CAKFQuwZaQOL2wMT=gGvtWWPcF1Gd9mb6vrxzicUtc=xdFEDEYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 26, 2024 at 6:54 PM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
>
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>
> > On Mon, Feb 26, 2024 at 5:46 PM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
> >
> > > Per recent discussion[1], plpgsql returns fairly unhelpful "syntax
> > > error" messages when a %TYPE or %ROWTYPE construct references a
> > > nonexistent object. Here's a quick little finger exercise to try
> > > to improve that.
> >
> > Looks this modify the error message, I want to know how ould we treat
> > error-message-compatible issue during minor / major upgrade.
> >
> > There is no bug here so no back-patch; and we are not yet past feature
> freeze for v17.
>
> Acutally I didn't asked about back-patch.
What else should I be understanding when you write the words "minor
upgrade"?
> So if the error message is changed, the above code may be broken.
>
>
A fair point to bring up, and is change-specific. User-facing error
messages should be informative and where they are not changing them is
reasonable. Runtime errors probably need more restraint since they are
more likely to be in a production monitoring alerting system but anything
that is reporting what amounts to a syntax error should be reasonable to
change and not expect people to be writing production code looking for
them. This seems to fall firmly into the "badly written code"/syntax
category.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-02-27 02:46:13 | Re: Printing backtrace of postgres processes |
Previous Message | Melanie Plageman | 2024-02-27 01:50:28 | Re: BitmapHeapScan streaming read user and prelim refactoring |