Re: Can't use WITH in a PERFORM query in PL/pgSQL? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Date
Msg-id 14230.1319140905@sss.pgh.pa.us
Whole thread Raw
In response to Re: Can't use WITH in a PERFORM query in PL/pgSQL?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Can't use WITH in a PERFORM query in PL/pgSQL?  (Merlin Moncure <mmoncure@gmail.com>)
Re: Can't use WITH in a PERFORM query in PL/pgSQL?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Sachin Srivastava
Date:
Subject: Re: BUG #6263: \l causes core dump with large database
Next
From: Merlin Moncure
Date:
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?