Re: Can't use WITH in a PERFORM query in PL/pgSQL?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jan Wieck <JanWieck(at)yahoo(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, depstein(at)alliedtesting(dot)com, pgsql-bugs(at)postgresql(dot)org, pgagarinov(at)alliedtesting(dot)com, vshahov(at)alliedtesting(dot)com
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date: 2011-10-20 04:35:56
Message-ID: CAFj8pRCvfuGYMiTAFCi4rOn8hnNbAh2aPVEtF=hmcQF1LsDLSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

2011/10/19 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> I wrote:
>> Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
>>> The point being, how do I convert any query to a non WITH variant so
>>> it can be PERFORM'd?  Anyways, I always thought having to do perform
>>> at all was pretty weak sauce -- not sure why it's required.
>
>> Possibly it was an Oracle compatibility thing ... anyone know PL/SQL
>> well enough to say how this works there?
>
> After writing that, I remembered I had an old PL/SQL manual sitting
> about, so I took a look.  So far as I can see, there is no PERFORM
> statement in PL/SQL, and no SELECT-without-INTO either; that is, the
> functionality of executing a SELECT and discarding the result simply
> isn't there.
>
> So at this point it looks like we made up PERFORM out of whole cloth,
> and we could just as easily choose to do it another way.  Jan, do you
> remember anything about the reasoning for PERFORM?
>

It has a CALL statement, or procedures can be called directly.

Regards

Pavel Stehule

>                        regards, tom lane
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Valentine Gogichashvili 2011-10-20 06:41:10 Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Previous Message Craig Ringer 2011-10-20 03:51:52 Re: Can't use WITH in a PERFORM query in PL/pgSQL?