From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)justatheory(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:31:38 |
Message-ID: | CAFj8pRAqpz=HeZMF-DPBRru23Hxu+zZqVgU+wh-jypCFwuEDQA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/8/20 David E. Wheeler <david(at)justatheory(dot)com>
> On Aug 20, 2013, at 2:24 PM, Marko Tiikkaja <marko(at)joh(dot)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).
>
but it works
postgres=# do $$begin with x as (select 10) insert into omega select * from
x; end;$$;
DO
Regards
Pavel
>
> Best,
>
> David
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2013-08-20 12:35:39 | Re: PL/pgSQL PERFORM with CTE |
Previous Message | David E. Wheeler | 2013-08-20 12:30:47 | Re: PL/pgSQL PERFORM with CTE |