Re: BUG? res.next() == false, but psql finds tuples? - Mailing list pgsql-jdbc

From Palle Girgensohn
Subject Re: BUG? res.next() == false, but psql finds tuples?
Date
Msg-id C7ACBCB95A235485E9CD223F@palle.girgensohn.se
Whole thread Raw
In response to Re: BUG? res.next() == false, but psql finds tuples?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG? res.next() == false, but psql finds tuples?
List pgsql-jdbc
--On fredag, april 22, 2005 11.17.33 -0400 Tom Lane <tgl@sss.pgh.pa.us>
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;

mango=# select lang from participant
mango-# where userid = 'mango'::varchar and course_id = 38;
 lang
------
 sv
(1 row)


i.e. works as expected...

hmmm.... is there any way to use the server's prepared statements from psql?

pgsql-jdbc by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: BUG? res.next() == false, but psql finds tuples?
Next
From: Oliver Jowett
Date:
Subject: Re: Threading problem