Re: SQL-Invoked Procedures for 8.1 - Mailing list pgsql-hackers

From Peter Mount
Subject Re: SQL-Invoked Procedures for 8.1
Date
Msg-id 4153D554.2050006@retep.org.uk
Whole thread Raw
In response to Re: SQL-Invoked Procedures for 8.1  (Maarten Boekhold <boekhold@emirates.net.ae>)
List 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.

Peter




pgsql-hackers by date:

Previous
From: Peter Mount
Date:
Subject: Re: SQL-Invoked Procedures for 8.1
Next
From: Neil Conway
Date:
Subject: Re: SQL-Invoked Procedures for 8.1