Re: PL/pgSQL PERFORM with CTE

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(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:45:25
Message-ID: F83E76D3-7715-4358-82AD-5706E43EC64D@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-08-20 12:46:15 Re: PL/pgSQL PERFORM with CTE
Previous Message Pavel Stehule 2013-08-20 12:44:44 Re: PL/pgSQL PERFORM with CTE