Re: "stored procedures" - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: "stored procedures"
Date
Msg-id 4DB067D1.1050002@agliodbs.com
Whole thread Raw
In response to "stored procedures"  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: "stored procedures"  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: "stored procedures"  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: "stored procedures"  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Peter,

> I would like to collect some specs on this feature.  So does anyone have
> links to documentation of existing implementations, or their own spec
> writeup?  A lot of people appear to have a very clear idea of this
> concept in their own head, so let's start collecting those.

Delta between SPs and Functions for PostgreSQL:

* SPs are executed using CALL or EXECUTE, and not SELECT.

* SPs do not return a value
** optional: SPs *may* have OUT parameters.

* SPs have internal transactions including begin/commit
** optional: SPs can run non-transaction statements,  like CREATE INDEX CONCURRENTLY and VACUUM
** corollary: SPs may not be called as part of a larger query
** question: if an SP is called by another SP, what is its  transaction context?

* optional: SPs can return multisets (ala SQL Server).
** question: how would multisets be handled on the client end?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: my signature
Next
From: Pavel Stehule
Date:
Subject: Re: "stored procedures"