| From: | Marko Tiikkaja <marko(at)joh(dot)to> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | "David E(dot) Wheeler" <david(at)justatheory(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: PL/pgSQL PERFORM with CTE |
| Date: | 2013-08-20 12:24:45 |
| Message-ID: | 5213600D.4090700@joh.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 8/20/13 2:21 PM, Pavel Stehule wrote:
> 2013/8/20 David E. Wheeler <david(at)justatheory(dot)com>
>> Well, there ought to be *some* way to tell PL/pgSQL to discard the result.
>> Right now I am adding a variable to select into but never otherwise use.
>> Inelegant, IMHO. Perhaps I’m missing some other way to do it?
>>
>> If so, it would help if the hint suggesting the use of PERFORM pointed to
>> such alternatives.
>>
>
> postgres=# DO $$
> BEGIN
> PERFORM * FROM (WITH now AS (SELECT now())
> SELECT * from now) x;
> END;
> $$;
> DO
.. which doesn't work if you want to use table-modifying CTEs.
Regards,
Marko Tiikkaja
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2013-08-20 12:25:39 | Re: PL/pgSQL PERFORM with CTE |
| Previous Message | Pavel Stehule | 2013-08-20 12:24:31 | Re: PL/pgSQL PERFORM with CTE |