From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Bart Samwel <bart@samwel.tk>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Output parameters
Date: Thu, 18 May 2006 08:32:47 +0900
Message-ID: <446BB29F.7070705@tpf.co.jp> (raw)
In-Reply-To: <446B7211.20804@samwel.tk>
References: <446AE2CF.5070607@samwel.tk>
<446B1B08.8020804@tpf.co.jp>
<446B1C1F.6040301@samwel.tk>
<446B1EB2.5040407@tpf.co.jp>
<446B7211.20804@samwel.tk>
Bart Samwel wrote:
> Hiroshi Inoue wrote:
>> Bart Samwel wrote:
>>> Hiroshi Inoue wrote:
>>>> Bart Samwel wrote:
>>>>> Hi there,
>>>>>
>>>>> I've got a situation with the experimental enhanced branch driver
>>>>> (version 7.03.02.66), PostgreSQL 8.1 backend. I'm executing a query
>>>>> such as:
>>>>>
>>>>> SELECT myproc(?,?,?,?,?,?,?)
>>>>>
>>>>> where a number of the parameters are output parameters. I've bound
>>>>> buffers to the output parameters, but when I read the values, they
>>>>> contain garbage (uninitialized data, to be precise -- 0xcdcdcdcd).
>>>>
>>>> What kind of tool are you using and how do you execute the above
>>>> example concretely ?
>>>
>>> I'm using our own ODBC front end library, freshly written from spec.
>>> The same code works like a charm on Oracle to retrieve output
>>> parameters. I could figure out the exact sequence of calls if you
>>> want, there's quite a lot of wrapper code around it but It'd probably
>>> be possible.
>>
>> Could you send me the Mylog output ?
>
> Yes, it's attached. Please read on for some extra context information. :-)
>
> Anyway, it turns out that I misinterpreted the way PostgreSQL implements
> output parameters -- apparently, they are nothing but a convenient way
> to make PostgreSQL create a complex return type for a function. In
> PL/pgSQL, however, I can't specify the output parameters in the
> parameter list, while with the ODBC driver I can.
Please use ODBC's standard syntax to execute functions or procedures.
{[?=]call procedure-name[([?][,[?]]...)]}
For example, please execute {CALL baz(?, ?)} in your case.
regards,
Hiroshi Inoue
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, bart@samwel.tk
Subject: Re: Output parameters
In-Reply-To: <446BB29F.7070705@tpf.co.jp>
References: <446AE2CF.5070607@samwel.tk> <446B1B08.8020804@tpf.co.jp> <446B1C1F.6040301@samwel.tk> <446B1EB2.5040407@tpf.co.jp> <446B7211.20804@samwel.tk> <446BB29F.7070705@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox