From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
Cc: | Marko Tiikkaja <marko(at)joh(dot)to>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL PERFORM with CTE |
Date: | 2013-08-20 12:53:22 |
Message-ID: | CAFj8pRC2n5wTYn7=1Fz7uNVYpX4pAi3FXV=8yM5SXtxH02gbsg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/8/20 David E. Wheeler <david(at)justatheory(dot)com>
> On Aug 20, 2013, at 2:41 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
>
> > yes, in this context you should not use a PERFORM
> >
> > PL/pgSQL protect you before useless queries - so you can use a CTE
> without returned result directly or CTE with result via PERFORM statement
> (and in this case it must be unmodifing CTE).
> >
> > Sorry, I don't see any problem - why you return some from CTE and then
> you throw this result?
>
> I am passing the values returned from a CTE to a call to pg_notify(). I do
> not care to collect the output of pg_notify(), which returns VOID.
>
it is little bit different issue - PL/pgSQL doesn't check if returned type
is VOID - it can be allowed, I am thinking. So check of empty result can be
enhanced.
Regards
Pavel
>
> Best,
>
> David
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Tiikkaja | 2013-08-20 12:59:27 | Re: PL/pgSQL PERFORM with CTE |
Previous Message | Stephen Frost | 2013-08-20 12:51:21 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |