pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: Balázs Zsoldos <balazs.zsoldos@everit.biz>
To: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted
Date: Fri, 31 Jul 2015 09:53:27 -0600
Message-ID: <55BB99F7.4040001@ttc-cmc.net> (raw)
In-Reply-To: <CAHEBw=TE6f5MFB3vfi+AnubOBGdD49ZxPomr3z3NbzKZb-B9nw@mail.gmail.com>
References: <CAHEBw=S+ON9b+x0X0yavXC3S2Q0sz1GCL7HBp0BZSFQPdzH-_A@mail.gmail.com>
	<CADK3HHLgm8bETPMYSP78kPCDqacSR3f1OYReyPd7q57xdcU-fg@mail.gmail.com>
	<CAHEBw=SzXwMXHPZ7Lt0QL0uCcUSsOrbt54tRGsxSZQVvpLYtgQ@mail.gmail.com>
	<CADK3HH+C5rbvOZHDYSfSnYJk_5swVhXtHtHVfQwwqBJMz2aXHA@mail.gmail.com>
	<CAHEBw=TE6f5MFB3vfi+AnubOBGdD49ZxPomr3z3NbzKZb-B9nw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (10+ messages)

Message-ID: <55BB99F7.4040001@ttc-cmc.net>
Permalink:  ../55BB99F7.4040001@ttc-cmc.net/
Also on:    postgresql.org/message-id/55BB99F7.4040001@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net, balazs.zsoldos@everit.biz
  Subject: Re: Why is columnNames in Connection.prepareStatement(sql, columnNames[]) automatically quoted
  In-Reply-To: <55BB99F7.4040001@ttc-cmc.net>
  References: <CAHEBw=S+ON9b+x0X0yavXC3S2Q0sz1GCL7HBp0BZSFQPdzH-_A@mail.gmail.com> <CADK3HHLgm8bETPMYSP78kPCDqacSR3f1OYReyPd7q57xdcU-fg@mail.gmail.com> <CAHEBw=SzXwMXHPZ7Lt0QL0uCcUSsOrbt54tRGsxSZQVvpLYtgQ@mail.gmail.com> <CADK3HH+C5rbvOZHDYSfSnYJk_5swVhXtHtHVfQwwqBJMz2aXHA@mail.gmail.com> <CAHEBw=TE6f5MFB3vfi+AnubOBGdD49ZxPomr3z3NbzKZb-B9nw@mail.gmail.com> <55BB99F7.4040001@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox