Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-28 Thread Pavel Stehule
út 28. 4. 2020 v 13:35 odesílatel Ashutosh Bapat < ashutosh.bapat@gmail.com> napsal: > On Mon, Apr 27, 2020 at 7:56 PM Greg Stark wrote: > > > > On Fri, 24 Apr 2020 at 10:08, Tom Lane wrote: > > > > > > I'm skeptical. If we'd marked them that way from day one, it would > have > > > been fin

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-28 Thread Ashutosh Bapat
On Mon, Apr 27, 2020 at 7:56 PM Greg Stark wrote: > > On Fri, 24 Apr 2020 at 10:08, Tom Lane wrote: > > > > I'm skeptical. If we'd marked them that way from day one, it would have > > been fine, but to change it now is a whole different discussion. I think > > the odds that anybody will thank u

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-27 Thread Pavel Stehule
po 27. 4. 2020 v 16:26 odesílatel Greg Stark napsal: > On Fri, 24 Apr 2020 at 10:08, Tom Lane wrote: > > > > I'm skeptical. If we'd marked them that way from day one, it would have > > been fine, but to change it now is a whole different discussion. I think > > the odds that anybody will thank

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-26 Thread Pavel Stehule
po 27. 4. 2020 v 5:02 odesílatel Kyotaro Horiguchi napsal: > At Fri, 24 Apr 2020 16:47:28 +0200, Pavel Stehule > wrote in > > pá 24. 4. 2020 v 16:07 odesílatel Tom Lane napsal: > > > > > Ashutosh Bapat writes: > > > > On Fri, Apr 24, 2020 at 12:24 PM Pavel Stehule < > pavel.steh...@gmail.com>

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-26 Thread Kyotaro Horiguchi
At Fri, 24 Apr 2020 16:47:28 +0200, Pavel Stehule wrote in > pá 24. 4. 2020 v 16:07 odesílatel Tom Lane napsal: > > > Ashutosh Bapat writes: > > > On Fri, Apr 24, 2020 at 12:24 PM Pavel Stehule > > wrote: > > >> plpgsql generate lot of auto variables - FOUND, SQLERRM, cycle's > > control var

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-24 Thread Pavel Stehule
pá 24. 4. 2020 v 16:07 odesílatel Tom Lane napsal: > Ashutosh Bapat writes: > > On Fri, Apr 24, 2020 at 12:24 PM Pavel Stehule > wrote: > >> plpgsql generate lot of auto variables - FOUND, SQLERRM, cycle's > control variable, TG_WHEN, TG_OP, .. > >> Currently these variables are not protected,

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-24 Thread Tom Lane
Ashutosh Bapat writes: > On Fri, Apr 24, 2020 at 12:24 PM Pavel Stehule > wrote: >> plpgsql generate lot of auto variables - FOUND, SQLERRM, cycle's control >> variable, TG_WHEN, TG_OP, .. >> Currently these variables are not protected, what can be source of problems, >> mainly for not experie

Re: proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-24 Thread Ashutosh Bapat
On Fri, Apr 24, 2020 at 12:24 PM Pavel Stehule wrote: > > Hi > > plpgsql generate lot of auto variables - FOUND, SQLERRM, cycle's control > variable, TG_WHEN, TG_OP, .. > > Currently these variables are not protected, what can be source of problems, > mainly for not experienced users. I propose

proposal - plpgsql - all plpgsql auto variables should be constant

2020-04-23 Thread Pavel Stehule
Hi plpgsql generate lot of auto variables - FOUND, SQLERRM, cycle's control variable, TG_WHEN, TG_OP, .. Currently these variables are not protected, what can be source of problems, mainly for not experienced users. I propose mark these variables as constant. -- today postgres=# do $$ begin for