Re: SQL-Invoked Procedures for 8.1

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL-Invoked Procedures for 8.1
Date: 2004-09-24 20:26:09
Message-ID: 20040924202609.GE1297@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 24, 2004 at 10:03:33AM -0400, Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > Or are you talking about non-scalar OUT params?
>
> Exactly. I agree that a procedure has no "return value" per se,
> but we need to be able to support OUT params that are rowsets.

FWIW, Sybase, MSSQL, and DB2 return recordsets via an 'open' SELECT or
OPEN CURSOR statement. IE: you execute a SELECT or an OPEN CURSOR, but
don't fetch it into anything. Oracle takes the track of fetching into a
refcursor or cursor variable, which you return as an OUT or INOUT parameter.
The advantage to MSSQL et all is it's less work/code. The advantage to
Oracle is there's no ambiguity.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-09-24 20:59:28 Re: CRITICAL HELP NEEDED! DEAD DB!
Previous Message Jan Wieck 2004-09-24 20:10:20 7.4.5 losing committed transactions