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: 4153D554.2050006@retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

Peter

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2004-09-24 08:38:07 Re: SQL-Invoked Procedures for 8.1
Previous Message Peter Mount 2004-09-24 07:56:15 Re: SQL-Invoked Procedures for 8.1