From: Oliver Jowett <oliver@opencloud.com>
To: Palle Girgensohn <girgen@pingpong.net>
Cc: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: BUG? res.next() == false, but psql finds tuples?
Date: Sat, 23 Apr 2005 10:22:50 +1200
Message-ID: <4269793A.70508@opencloud.com> (raw)
In-Reply-To: <33BB4E111EB7BD3E8DC36536@palle.girgensohn.se>
References: <D05A33D3D62A6E1764DC8B8B@rambutan.pingpong.net>
<42690728.9040101@fastcrypt.com>
<42697654.8030702@opencloud.com>
<33BB4E111EB7BD3E8DC36536@palle.girgensohn.se>
Palle Girgensohn wrote:
> --On lördag, april 23, 2005 10.10.28 +1200 Oliver Jowett
> <oliver@opencloud.com> wrote:
>
>> Dave Cramer wrote:
>>
>>> Certainly looks like a bug, in the java version mango is not quoted so
>>> pg thinks it is a column.
>>>
>>> Although I just checked the test cases and we do this all the time ???
>>
>>
>> The (lack of) quoting is a red herring, it's just how our
>> PreparedStatement.toString() is implemented. The actual query sent uses
>> $1/$2 as you can see in the tcpdump.
>
>
> Is there a way to mimic this behaviour, i.e. using a prepared statement
> with $1/$2, in psql?
You could use PREPARE/EXECUTE which is similiar if not identical. From
memory:
PREPARE foo(int,varchar) AS SELECT ... $1 ... $2 ...;
EXECUTE foo(42, "bar");
-O
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-jdbc@postgresql.org
Cc: oliver@opencloud.com, girgen@pingpong.net, pg@fastcrypt.com
Subject: Re: BUG? res.next() == false, but psql finds tuples?
In-Reply-To: <4269793A.70508@opencloud.com>
References: <D05A33D3D62A6E1764DC8B8B@rambutan.pingpong.net> <42690728.9040101@fastcrypt.com> <42697654.8030702@opencloud.com> <33BB4E111EB7BD3E8DC36536@palle.girgensohn.se> <4269793A.70508@opencloud.com>
* 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