Re: PL/pgSQL PERFORM with CTE - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: PL/pgSQL PERFORM with CTE
Date
Msg-id 4DB06DE7-B5D8-4059-938C-12BBAB4F50FB@justatheory.com
Whole thread Raw
In response to Re: PL/pgSQL PERFORM with CTE  (Marko Tiikkaja <marko@joh.to>)
Responses Re: PL/pgSQL PERFORM with CTE  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Aug 20, 2013, at 2:24 PM, Marko Tiikkaja <marko@joh.to> wrote:

>> 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.

Which, in fact, is exactly my use case (though not what I posted upthread).

Best,

David




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: PL/pgSQL PERFORM with CTE
Next
From: Pavel Stehule
Date:
Subject: Re: PL/pgSQL PERFORM with CTE