X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9BF2A533A9 for ; Fri, 22 Apr 2005 12:36:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70825-01 for ; Fri, 22 Apr 2005 15:35:55 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 552335377F for ; Fri, 22 Apr 2005 12:35:54 -0300 (ADT) Received: (qmail 19195 invoked from network); 22 Apr 2005 15:34:32 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 22 Apr 2005 15:34:32 -0000 Message-ID: <426919D5.3010001@fastcrypt.com> Date: Fri, 22 Apr 2005 11:35:49 -0400 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Palle Girgensohn , pgsql-jdbc@postgresql.org Subject: Re: BUG? res.next() == false, but psql finds tuples? References: <42690728.9040101@fastcrypt.com> <809.1114182092@sss.pgh.pa.us> <986.1114183053@sss.pgh.pa.us> In-Reply-To: <986.1114183053@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.028 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/145 X-Sequence-Number: 12752 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 writes: > > >>--On fredag, april 22, 2005 11.01.32 -0400 Tom Lane >>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