On Thu, Mar 24, 2011 at 10:36 AM, Pavel Stehule <pavel.steh...@gmail.com> wrote:
> Hello
>
> why you can do it?
>
> please, try to RETURN QUERY ...
>
> Regards
>
> Pavel Stehule
>
>
>>
>> $$begin
>>
>> perform(
>>
>> with A as (select generate_series(1,3) as foo)
>>
>> select foo from A
>>
>> );
>>
>> end$$;

This is 'DO' statement.  Also I think this is legitimate bug:

you can do perform func(foo_id) from something;

but not

with something as (something)
perform func(foo_id) from something;

this might do as workaround:
do
$$begin
perform(
with A as (select 1 as foo)
select array(select foo from A)
);
end$$;

merlin

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to