From: | Zsolt Kúti <kuti(dot)zsolt(at)prolan(dot)hu> |
---|---|
To: | |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: The column name <col> was not found in this ResultSet |
Date: | 2012-11-22 09:25:33 |
Message-ID: | 20121122102533.79795a45@kuti-zsolt.intranet.prolan.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Mon, 19 Nov 2012 09:31:17 +0800 -n
Craig Ringer <craig(at)2ndQuadrant(dot)com> írta:
...
> In my opinion (a) would be horrible to use, and it appears to be
> contrary to the JDBC Resultset spec as well. You'd have to "double
> quote" every identifier if you wanted to use mixed case or any kind of
> non-alphanumeric strings, so:
>
> rs.getString("B.F. Name")
>
> would have to become:
>
> rs.getString("\"B.F. Name\"")
>
> or users would get syntax errors, identifier parsing errors, or
> bizarre errors about columns not being found.
>
> So (b) is the best compromise, really. Just alias your columns to
> disambiguate them in the result set by specifying `AS` aliases.
Craig! Thank you for the explanation!
I am to live with b...
Zsolt
From | Date | Subject | |
---|---|---|---|
Next Message | Ermengol Bota | 2012-11-26 13:00:28 | Problems with BIT datatype and preparedStatment |
Previous Message | Craig Ringer | 2012-11-19 01:31:17 | Re: The column name <col> was not found in this ResultSet |