On 8/20/13 2:21 PM, Pavel Stehule wrote:
> 2013/8/20 David E. Wheeler <david@justatheory.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