| From: | Dave Cramer <pg(at)fastcrypt(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Palle Girgensohn <girgen(at)pingpong(dot)net>, pgsql-jdbc(at)postgresql(dot)org | 
| Subject: | Re: BUG? res.next() == false, but psql finds tuples? | 
| Date: | 2005-04-22 15:35:49 | 
| Message-ID: | 426919D5.3010001@fastcrypt.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-jdbc | 
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(at)pingpong(dot)net> writes:
>  
>
>>--On fredag, april 22, 2005 11.01.32 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Palle Girgensohn | 2005-04-22 22:00:32 | Re: BUG? res.next() == false, but psql finds tuples? | 
| Previous Message | Dave Cramer | 2005-04-22 15:23:12 | Re: BUG? res.next() == false, but psql finds tuples? |