pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jan Wieck <JanWieck@Yahoo.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: depstein@alliedtesting.com
Cc: pgsql-bugs@postgresql.org
Cc: pgagarinov@alliedtesting.com
Cc: vshahov@alliedtesting.com
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date: Wed, 19 Oct 2011 17:23:23 -0400
Message-ID: <19857.1319059403@sss.pgh.pa.us> (raw)
In-Reply-To: <19518.1319057158@sss.pgh.pa.us>
References: <29F36C7C98AB09499B1A209D48EAA615B501DA9401@mail2a.alliedtesting.com>
	<201109061743.p86HhQX16354@momjian.us>
	<CA+TgmoazonH3XsKwCO1-MSpd+YnT48TpzcHjEJRJQDjkY1Y-AA@mail.gmail.com>
	<CAHyXU0zEzSSrf3C4nzP3=LGbWhwjpKzL=xpTztUYrPPc3btKAg@mail.gmail.com>
	<19518.1319057158@sss.pgh.pa.us>

I wrote:
> Merlin Moncure <mmoncure@gmail.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?

			regards, tom lane



view thread (24+ messages)  latest in thread

Message-ID: <19857.1319059403@sss.pgh.pa.us>
Permalink:  ../19857.1319059403@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19857.1319059403@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com, robertmhaas@gmail.com, JanWieck@Yahoo.com, bruce@momjian.us, depstein@alliedtesting.com, pgagarinov@alliedtesting.com, vshahov@alliedtesting.com
  Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
  In-Reply-To: <19857.1319059403@sss.pgh.pa.us>
  References: <29F36C7C98AB09499B1A209D48EAA615B501DA9401@mail2a.alliedtesting.com> <201109061743.p86HhQX16354@momjian.us> <CA+TgmoazonH3XsKwCO1-MSpd+YnT48TpzcHjEJRJQDjkY1Y-AA@mail.gmail.com> <CAHyXU0zEzSSrf3C4nzP3=LGbWhwjpKzL=xpTztUYrPPc3btKAg@mail.gmail.com> <19518.1319057158@sss.pgh.pa.us> <19857.1319059403@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox