pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Valentine Gogichashvili <valgog@gmail.com>
Cc: pgsql-bugs@postgresql.org
Cc: Merlin Moncure <mmoncure@gmail.com>
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date: Thu, 20 Oct 2011 16:01:45 -0400
Message-ID: <14230.1319140905@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRC1be1ckLOhiJpSQBpWs1ijLh=poRrCpFRbrsEtmKTNqA@mail.gmail.com>
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>
	<CAP93muUHoGyyewC=XgBd33SB-VuEBRNHDsbC_DV2kOHsJWWv9w@mail.gmail.com>
	<CAFj8pRDnSs-pX79a85FGN3Awc-_0xkavMNAMgw6MNvd9bDHA6w@mail.gmail.com>
	<CAHyXU0wnLGOSYqdQy-jwxXQUPfJNcwPLdRX9QYdZ-XiUQsDyig@mail.gmail.com>
	<CAP93muVCKvMGFzzRzZmQ3t_4JVeOEj5VUVZimaSr8J3QMQZ7Mw@mail.gmail.com>
	<25223.1319130933@sss.pgh.pa.us>
	<CAFj8pRC1be1ckLOhiJpSQBpWs1ijLh=poRrCpFRbrsEtmKTNqA@mail.gmail.com>

Pavel Stehule <pavel.stehule@gmail.com> writes:
> I didn't design a PERFORM statement. There is two views - somebody
> from sybase's family know so SELECT without into is forwarded to
> client. This functionality is missing on Oracle's family. Is true so
> PERFORM statement is strange,  but maybe it's open door for sybase's
> functionality that was not implemented ever.

I cannot imagine that we'd ever make SELECT inside a plpgsql function
act like that.  Functions have no business directly transmitting
information to the client; if they tried, they'd most likely just break
the FE/BE protocol.

There might be use for such a thing in a hypothetical "real stored
procedure language" where the code is executing in a context entirely
different from what Postgres functions run in ... but that language
would be something different from plpgsql.

I grant the argument that people coming from Sybase-ish DBs might be
confused by this; but the current arrangement is also confusing lots
of people, so I don't think that argument has all that much weight.

			regards, tom lane



view thread (24+ messages)  latest in thread

Message-ID: <14230.1319140905@sss.pgh.pa.us>
Permalink:  ../14230.1319140905@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14230.1319140905@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, pavel.stehule@gmail.com, valgog@gmail.com, mmoncure@gmail.com
  Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?
  In-Reply-To: <14230.1319140905@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> <CAP93muUHoGyyewC=XgBd33SB-VuEBRNHDsbC_DV2kOHsJWWv9w@mail.gmail.com> <CAFj8pRDnSs-pX79a85FGN3Awc-_0xkavMNAMgw6MNvd9bDHA6w@mail.gmail.com> <CAHyXU0wnLGOSYqdQy-jwxXQUPfJNcwPLdRX9QYdZ-XiUQsDyig@mail.gmail.com> <CAP93muVCKvMGFzzRzZmQ3t_4JVeOEj5VUVZimaSr8J3QMQZ7Mw@mail.gmail.com> <25223.1319130933@sss.pgh.pa.us> <CAFj8pRC1be1ckLOhiJpSQBpWs1ijLh=poRrCpFRbrsEtmKTNqA@mail.gmail.com> <14230.1319140905@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