Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted

Поиск
Список
Период
Сортировка
От dmp
Тема Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted
Дата
Msg-id 55BB99F7.4040001@ttc-cmc.net
обсуждение исходный текст
Ответ на Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted  (Balázs Zsoldos <balazs.zsoldos@everit.biz>)
Список 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 по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Re: need advice about out parameter settings while calling stored procedure in Java code
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: Re: need advice about out parameter settings while calling stored procedure in Java code