From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Ida Schonfeld <Ida.Schonfeld@oclc.org>
Cc: pgsql-odbc@postgresql.org
Subject: Re: ODBC driver chances function-call in a wrong way
Date: Sat, 17 Jan 2009 14:07:34 +0900
Message-ID: <49716796.1080909@tpf.co.jp> (raw)
In-Reply-To: <089C615FFB98CE48BBA6E8EB9AD4A0C9044B18CD@mail.pica.nl>
References: <089C615FFB98CE48BBA6E8EB9AD4A0C9044B18CD@mail.pica.nl>
Ida Schonfeld wrote:
> Hello,
>
>
>
> I have the following problem:
>
>
>
>
>
> I have a PG function in my database which looks like this:
>
>
>
> CREATE OR REPLACE FUNCTION help_sel0(IN a int,IN b char(2),OUT
> master_fileset INT, OUT master_type CHAR(2), OUT highest_number INT)
> RETURNS RECORD AS
>
> $function$
>
> DECLARE
>
> r RECORD;
>
> BEGIN
>
> SELECT INTO r
> master_fileset,master_type,highest_number
>
> FROM gen_master
>
> WHERE master_fileset= a
>
> AND master_type= b;
>
> master_fileset:=r.master_fileset;
>
> master_type:=r.master_type;
>
> highest_number:=r.highest_number;
>
> END;
>
> $function$
>
> LANGUAGE plpgsql;
>
>
>
> When I now want to send with my ODBC-programm the following prepared
> statement to the server
>
> {SELECT * FROM gen_master_sel0(?,?);} (with the parameters 10 and ‘S2’)
The above call is wrong.
You should prepare the ODBC style procedure call
{call gen_master_sel0(?,?)}
or you can simply prepare the pg-specific procedure call
SELECT * FROM gen_master_sel0(?,?)
.
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, Ida.Schonfeld@oclc.org
Subject: Re: ODBC driver chances function-call in a wrong way
In-Reply-To: <49716796.1080909@tpf.co.jp>
References: <089C615FFB98CE48BBA6E8EB9AD4A0C9044B18CD@mail.pica.nl> <49716796.1080909@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