From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, DUVAL REMI <REMI(dot)DUVAL(at)cheops(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: proposal: schema variables |
Date: | 2024-11-21 04:07:09 |
Message-ID: | CAFj8pRDDTfQdE9kZjRvLSAVtd1jfEKFoUG+U9XQEFjhM4yz9EA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
st 20. 11. 2024 v 21:14 odesílatel Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
napsal:
> > On Tue, Nov 19, 2024 at 08:14:01PM +0100, Pavel Stehule wrote:
> > Hi
> >
> > I wrote POC of VARIABLE(varname) syntax support
>
> Thanks, the results look good. I'm still opposed the idea of having a
> warning, and think it has to be an error -- but it's my subjective
> opinion. Lets see if there are more votes on that topic.
>
The error breaks the possibility to use variables (session variables) like
Oracle's package variables easily. It increases effort for transformation
or porting because you should identify variables inside queries and you
should wrap it to fence. On the other hand, extensions that can read a
query after transformation can easily detect unwrapped variables and they
can raise an error. It can be very easy to implement this check to
plpgsql_check for example or like plpgsql.extra_check.
In my ideal world, the shadowing warning should be enabled by default, and
an unfencing warning disabled by default. But I have not a problem with
activating both warnings by default. I think warnings are enough, because
if there is some risk then a shadowing warning is activated. And my
experience is more positive about warnings, people read it.
Regards
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2024-11-21 05:06:32 | Re: Introduce XID age and inactive timeout based replication slot invalidation |
Previous Message | Jingtang Zhang | 2024-11-21 04:06:03 | Redundant initialization of table AM oid in relcache |
From | Date | Subject | |
---|---|---|---|
Previous Message | Tom Lane | 2024-11-20 22:26:29 | Re: Has gen_random_uuid() gotten much slower in v17? |