Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread David G. Johnston
On Mon, Feb 26, 2024 at 6:54 PM Andy Fan wrote: > > "David G. Johnston" writes: > > > On Mon, Feb 26, 2024 at 5:46 PM Andy Fan wrote: > > > > > Per recent discussion[1], plpgsql returns fairly unhelpful "syntax > > > error" messages when a %TYPE or %ROWTYPE construct references a > > >

Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread Andy Fan
"David G. Johnston" writes: > On Mon, Feb 26, 2024 at 5:46 PM Andy Fan 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 >

Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Feb 26, 2024 at 5:46 PM Andy Fan wrote: >> Looks this modify the error message, Well, yeah, that's sort of the point. >> I want to know how ould we treat >> error-message-compatible issue during minor / major upgrade. > There is no bug here so no

Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread David G. Johnston
On Mon, Feb 26, 2024 at 5:46 PM Andy Fan 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

Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread Andy Fan
> 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

Re: Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread Pavel Stehule
po 26. 2. 2024 v 21:02 odesílatel Tom Lane napsal: > 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. > > The basic point is

Better error messages for %TYPE and %ROWTYPE in plpgsql

2024-02-26 Thread Tom Lane
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. The basic point is that plpgsql_parse_wordtype and friends are designed to return