Skip site navigation (1) Skip section navigation (2)

Re: SQL-Invoked Procedures for 8.1

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Maarten Boekhold <boekhold(at)emirates(dot)net(dot)ae>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQL-Invoked Procedures for 8.1
Date: 2004-09-24 08:05:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Maarten Boekhold wrote:

> Joe Conway wrote:
>> Gavin Sherry wrote:
>>> Do you have any idea about databases returning result sets from SQL
>>> procedures (ie, not functions).
>> As other's have pointed out, this is very common in the MS SQL Server 
>> world (and I believe Sysbase also supports it). It works like:
> And these databases also return a result status/value from the stored 
> procedure. IIRC this result is limited to an int value.
> Maarten

Yes, MS SQL returns an int as far as I know (all the procs I use return 
an int), but in theory it can be any type.

 From my useage, the return parameter (if requested) is returned as the 
first out parameter.

Ie, from JDBC, my CallableStateme is of the form: "? = Call dbo.MyProc( 
?, ?, ? )" so I can simply use cs.getInt( 1 ); to get at that value. If 
I don't ask for the return code, then I don't receive it.


In response to

pgsql-hackers by date

Next:From: Neil ConwayDate: 2004-09-24 08:38:07
Subject: Re: SQL-Invoked Procedures for 8.1
Previous:From: Peter MountDate: 2004-09-24 07:56:15
Subject: Re: SQL-Invoked Procedures for 8.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group