Re: [JDBC] driver fails to handle strings in query statements properly (ignore my last post)

2001-10-02 Thread Dave Cramer
PM To: 'Tom Lane' Cc: [EMAIL PROTECTED] Subject: Re: [JDBC] driver fails to handle strings in query statements properly As I said, I have no idea how the backend handles it when it is quoted. You mention that it's not a column reference, but it does get data from the id column?

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
16 PM To: [EMAIL PROTECTED] Cc: 'Barry Lind'; [EMAIL PROTECTED] Subject: Re: [JDBC] driver fails to handle strings in query statements properly "Dave Cramer" <[EMAIL PROTECTED]> writes: > I tried it on a table which id was an int > Using "select 'id&#

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Tom Lane
"Dave Cramer" <[EMAIL PROTECTED]> writes: > I tried it on a table which id was an int > Using "select 'id' as xxx from ..." Returns xxx as an unknown type > Using "select id as xxx from... " returns xxx as an int > I have no idea how the backend handles this, but if it can figure it out > in one i

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
't it figure it out when I put single quotes around it? Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Tom Lane Sent: October 2, 2001 5:19 PM To: Barry Lind Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [JDBC] driver fails to handle s

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
Ok, sounds good, I have time and will take care of it. Dave -Original Message- From: Barry Lind [mailto:[EMAIL PROTECTED]] Sent: October 2, 2001 4:21 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: driver fails to handle strings in query statements properly Dave, My thoug

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Tom Lane
Barry Lind <[EMAIL PROTECTED]> writes: > My thoughts as well. If we encounter an 'unknown' type, just return it > as a String. Do you have time to fix this? >> I suppose we could return it as a string when we are in doubt? Is this >> reasonable since there are many other types it should be ret

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Barry Lind
Dave, My thoughts as well. If we encounter an 'unknown' type, just return it as a String. Do you have time to fix this? As a work around using an explicit cast should also work: select container_20_ft_qty AS QTY_OH, 'Container'::text AS NOMENCLATURE from ue_summary_mtmc where uic = 'WAQJAA'

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
This is coming back from the backend as type unknown. If the single quotes are removed it works ok? I suppose we could return it as a string when we are in doubt? Is this reasonable since there are many other types it should be returned as? Dave -Original Message- From: [EMAIL PROTECTE