Re: driver fails to handle strings in query statements properly - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: driver fails to handle strings in query statements properly
Date
Msg-id 19724.1002060967@sss.pgh.pa.us
Whole thread Raw
In response to Re: driver fails to handle strings in query statements properly  ("Dave Cramer" <Dave@micro-automation.net>)
Responses Re: driver fails to handle strings in query statements properly  ("Dave Cramer" <Dave@micro-automation.net>)
List pgsql-jdbc
"Dave Cramer" <Dave@micro-automation.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

pgsql-jdbc by date:

Previous
From: Dave Harkness
Date:
Subject: Re: LOCK TABLE oddness in PLpgSQL function called via JDBC
Next
From: Tom Lane
Date:
Subject: Re: LOCK TABLE oddness in PLpgSQL function called via JDBC