From: | "Dave Cramer" <Dave(at)micro-automation(dot)net> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: driver fails to handle strings in query statements properly (ignore my last post) |
Date: | 2001-10-03 02:23:52 |
Message-ID: | 009401c14bb2$721d28a0$8201a8c0@inspiron |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Ok, I need some sleep, now I see what it does, which is probably not
what the user wanted, but I have fixed the driver to it doesn't throw an
exception.
Dave
-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Dave Cramer
Sent: October 2, 2001 9:12 PM
To: 'Tom Lane'
Cc: pgsql-jdbc(at)postgresql(dot)org
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?
Dave
-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: October 2, 2001 6:16 PM
To: Dave(at)micro-automation(dot)net
Cc: 'Barry Lind'; pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] driver fails to handle strings in query statements
properly
"Dave Cramer" <Dave(at)micro-automation(dot)net> 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
> instance why can't it figure it out when I put single quotes around
> it?
Uh ... when you put single quotes around it, it's a literal, not a
column reference ... and whatever one might think about 'id', it's
certainly not an integer.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Harkness | 2001-10-03 02:37:40 | PROBLEM SOLVED: LOCK TABLE oddness in PLpgSQL function called via JDBC |
Previous Message | Ray Tomlinson | 2001-10-03 01:54:26 | Re: jdbc download jar is corrupted |