Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted - Mailing list pgsql-jdbc

From dmp
Subject Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted
Date
Msg-id 55BB99F7.4040001@ttc-cmc.net
Whole thread Raw
In response to Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted  (Balázs Zsoldos <balazs.zsoldos@everit.biz>)
List pgsql-jdbc
Balázs Zsoldos wrote:
> One of the solutions is that I quote in every database and every statement. If
> that is the only way, I can accept that. The one who has to write SQL statements
> by hand on the command line might get a bit angry :-).


Hello Balázs,

    I have a generic access tool for databases and support Derby, H2, HSQL,
MariaDB, MS SQL, MSAccess, MySQL, Oracle, PostgreSQL, and SQLite. Early on
I did not quote table, column names, etc. In not doing so it became obvious
the tool would not be able to work with some users mixed upper and lower
case character definitions for identifiers.

    Most of the database do use quotes for identifiers for the reason Dave
indicated to support upper and lowercase character definitions for users.

    I also advise properly quoting field data that are not explicity defined
as numbers. Case by case context of course.

danap.



pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Re: need advice about out parameter settings while calling stored procedure in Java code
Next
From: Vladimir Sitnikov
Date:
Subject: Re: Re: need advice about out parameter settings while calling stored procedure in Java code