From: Dave Cramer <pg@fastcrypt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Palle Girgensohn <girgen@pingpong.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: BUG? res.next() == false, but psql finds tuples?
Date: Fri, 22 Apr 2005 11:35:49 -0400
Message-ID: <426919D5.3010001@fastcrypt.com> (raw)
In-Reply-To: <986.1114183053@sss.pgh.pa.us>
References: <D05A33D3D62A6E1764DC8B8B@rambutan.pingpong.net>
<42690728.9040101@fastcrypt.com>
<809.1114182092@sss.pgh.pa.us>
<BB67E201AD7D7BB34C75A481@rambutan.pingpong.net>
<986.1114183053@sss.pgh.pa.us>
works fine on HEAD...
create table participant ( userid text, course_id int4)
davec=# select * from participant where userid='mango'::varchar and
course_id=38;
userid | course_id
--------+-----------
mango | 38
Dave
Tom Lane wrote:
>Palle Girgensohn <girgen@pingpong.net> writes:
>
>
>>--On fredag, april 22, 2005 11.01.32 -0400 Tom Lane <tgl@sss.pgh.pa.us>
>>wrote:
>>
>>
>>>I'm wondering about misassignment of data types or something. It's not
>>>clear though how that would result in no error but zero rows returned.
>>>What are the column data types exactly?
>>>
>>>
>
>
>
>>userid is text (setInt())
>>courseid is int (setString())
>>
>>
>
>The tcpdump shows that JDBC is specifying the parameter types as 1043
>(varchar) and 23 (int4). It's hard to believe that varchar versus
>text would be an issue ... but ... what happens if you do this in
>psql?
> select lang from participant
> where userid = 'mango'::varchar and course_id = 38;
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
>
>
--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
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: pg@fastcrypt.com, tgl@sss.pgh.pa.us, girgen@pingpong.net
Subject: Re: BUG? res.next() == false, but psql finds tuples?
In-Reply-To: <426919D5.3010001@fastcrypt.com>
References: <D05A33D3D62A6E1764DC8B8B@rambutan.pingpong.net> <42690728.9040101@fastcrypt.com> <809.1114182092@sss.pgh.pa.us> <BB67E201AD7D7BB34C75A481@rambutan.pingpong.net> <986.1114183053@sss.pgh.pa.us> <426919D5.3010001@fastcrypt.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