agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gavin Sherry <swm@linuxworld.com.au>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Where are we on stored procedures?
Date: Fri, 25 Feb 2005 17:48:16 +1100
Message-ID: <421ECA30.8040007@samurai.com> (raw)
In-Reply-To: <29295.1109295241@sss.pgh.pa.us>
References: <26903.1109275995@sss.pgh.pa.us>
	<Pine.LNX.4.58.0502250952150.23330@linuxworld.com.au>
	<29295.1109295241@sss.pgh.pa.us>

Tom Lane wrote:
> Essentially I'm thinking about the JDBC solution, but automated a bit
> better.

So would your proposal invent a new "stored procedure" construct, or 
just add some sugar to the existing function stuff? i.e. will you be 
able to issue a CREATE FUNCTION that specifies OUT parameters?

> This doesn't address the question of SETOF results, of course.  I'm
> leaning towards returning those as cursors.

This is part of the reason I liked the approach of introduced SQL-level 
variables. Besides being a feature that has some use in itself, it could 
be extended reasonably cleanly to allow (effectively) SETOF variables 
and rowtype variables.

> Well, I think that when people ask us for "stored procedures", most of
> them mean that they want transaction control.

Yes, that is certainly what Gavin and I spent most of our time banging 
our heads against the wall on :(

> But if you can pass over what you have, I'd like to see about
> pressing forward.

Sure, I've attached a very WIP patch with the utility command 
definitions; unfortunately I don't think it will be of much use, as much 
of it is CREATE PROCEDURE-related boilerplate. Gavin will update the 
matching-arguments-by-name code to HEAD at some point in the future; I 
believe that works fine for functions (since we just error out in case 
of ambiguity), so we can include it in 8.1 independently on any other 
work on SPs.

-Neil

Attachments:

  [application/gzip] spdevel-2.patch.gz (20.2K, ../421ECA30.8040007@samurai.com/2-spdevel-2.patch.gz)
  download

view thread (15+ messages)  latest in thread

Message-ID: <421ECA30.8040007@samurai.com>
Permalink:  ../421ECA30.8040007@samurai.com/
Also on:    postgresql.org/message-id/421ECA30.8040007@samurai.com

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: neilc@samurai.com, tgl@sss.pgh.pa.us, swm@linuxworld.com.au, pgsql-jdbc@postgresql.org
  Subject: Re: Where are we on stored procedures?
  In-Reply-To: <421ECA30.8040007@samurai.com>

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

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