Re: driver fails to handle strings in query statements properly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave(at)micro-automation(dot)net
Cc: "'Barry Lind'" <barry(at)xythos(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: driver fails to handle strings in query statements properly
Date: 2001-10-02 22:16:07
Message-ID: 19724.1002060967@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2001-10-02 22:29:12 Re: LOCK TABLE oddness in PLpgSQL function called via JDBC
Previous Message Dave Harkness 2001-10-02 22:03:56 Re: LOCK TABLE oddness in PLpgSQL function called via JDBC