Re: Error while returning auto-generated values
От | Craig Ringer |
---|---|
Тема | Re: Error while returning auto-generated values |
Дата | |
Msg-id | 509B698B.1040903@2ndQuadrant.com обсуждение исходный текст |
Ответ на | Error while returning auto-generated values (Amila De Silva <amilad@wso2.com>) |
Ответы |
Re: Error while returning auto-generated values
|
Список | pgsql-jdbc |
On 11/08/2012 04:00 PM, Amila De Silva wrote: > > Simply by changing the case of SUBSCRIBER_ID to lower case, in return > column array ,this error can be avoided. But the problem is that > change is not feasible. Yes, that's how it works. It's nothing to do with JDBC, you'll get the same result if you run the query directly in psql. "DOUBLE QUOTED" identifiers are case-preserving, while unquoted identifiers are downcased. This means that you must quote consistently - everywhere, or nowhere. PgJDBC does not have a parameter to control this behaviour because PostgreSQL does not have a parameter to control it. PgJDBC can hardly parse all your SQL and add or remove quoting - in fact, attempting to do so could be very dangerous and even lead to security vulnerabilities. > Is it possible to solve this problem by changing the DDL statement or > any connection parameters? Yes, you need to change the DDL so that it also "DOUBLE QUOTES" identifiers if they are "DOUBLE QUOTED" when used in queries. If your queries use a mix of unquoted and quoted values, or mix of cases, then you're going to have go to through and fix them all to be consistent. -- Craig Ringer
В списке pgsql-jdbc по дате отправления: