pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: 'GEISINGER Marc - Contractor' <Marc.GEISINGER@external.thalesgroup.com>
To: 'Dave Cramer' <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
Date: Mon, 24 Sep 2012 11:49:23 -0400
Message-ID: <003e01cd9a6c$2b6ea770$824bf650$@yahoo.com> (raw)
In-Reply-To: <6830_1348483308_506038EC_6830_5625_1_E4DFA2E3210FA443B032684B39D16BB4092FB6683E@THSNCOA06MXS02P.ONE-06.GRP>
References: <31630_1348140231_505AFCC7_31630_19463_1_E4DFA2E3210FA443B032684B39D16BB4092FB05DA1@THSNCOA06MXS02P.ONE-06.GRP>
	<CADK3HHLahcUgELs3Hp_R3EUn44pTuS4qahQUN1Tbhu6G5i=3RA@mail.gmail.com>
	<20900_1348212583_505C1767_20900_6851_1_E4DFA2E3210FA443B032684B39D16BB4092FB06168@THSNCOA06MXS02P.ONE-06.GRP>
	<012501cd9815$42b55e50$c8201af0$@yahoo.com>
	<012c01cd9818$1ca45060$55ecf120$@yahoo.com>
	<6830_1348470710_506007B6_6830_1428_1_E4DFA2E3210FA443B032684B39D16BB4092FB065BE@THSNCOA06MXS02P.ONE-06.GRP>
	<CADK3HHJJjDp-W4oVcuKY79s+df1qWJLSQ9B8pLwx-zHDBp2Qtw@mail.gmail.com>
	<6830_1348483308_506038EC_6830_5625_1_E4DFA2E3210FA443B032684B39D16BB4092FB6683E@THSNCOA06MXS02P.ONE-06.GRP>

> Hi Dave,
> I don't want this feature removed. I just would like to see this fixed so
that
> dollar quoted strings are correctly seen as strings, and therefor without
sql
> escape clauses replacing. Like the comment for replaceProcessing says
"look
> through non-string sql code". Dollar quoted strings are strings for
postgresql.
> 

But they are not "strings" for JDBC.  The JDBC syntax is a distinct entity
and if you use JDBC features you are expected to adhere to its standards.

Furthermore, the code comment in the driver does not constitute the
canonical behavior of the JDBC specification.

Regardless of whether the JDBC specification addresses what a valid "string
delimiter" is the fact remains that such a definition has to be made at the
JDBC level if the definition is used to implement a JDBC-only feature.

Since unquoted identifiers can include the dollar-sign in PostgreSQL a
broader analysis of the entire query is going to be required.  It would
behoove whoever decides to implement this to look and see exactly how
PostgreSQL itself handles identification of dollar-quoting versus
dollar-including-identifiers.

The semantics and definition, though, are pretty much meaningless.  Someone
still has to actually code an implementation regardless of whether it is a
"bug" or a "enhancement".  Or, as mentioned before, you can simply fix your
own environment so that you can enable or disable escape processing as you
deem necessary.  I still feel that mixing the two behaviors is wrong and no
attempt to do so should be made.  At best identify that mixing has occurred
and thrown an exception.  At worse ignore the escapes and let the database
inform the user of their error.



view thread (29+ messages)  latest in thread

Message-ID: <003e01cd9a6c$2b6ea770$824bf650$@yahoo.com>
Permalink:  ../003e01cd9a6c$2b6ea770$824bf650$@yahoo.com/
Also on:    postgresql.org/message-id/003e01cd9a6c$2b6ea770$824bf650$@yahoo.com

 · 

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: polobo@yahoo.com, Marc.GEISINGER@external.thalesgroup.com, pg@fastcrypt.com
  Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
  In-Reply-To: <003e01cd9a6c$2b6ea770$824bf650$@yahoo.com>
  References: <31630_1348140231_505AFCC7_31630_19463_1_E4DFA2E3210FA443B032684B39D16BB4092FB05DA1@THSNCOA06MXS02P.ONE-06.GRP> <CADK3HHLahcUgELs3Hp_R3EUn44pTuS4qahQUN1Tbhu6G5i=3RA@mail.gmail.com> <20900_1348212583_505C1767_20900_6851_1_E4DFA2E3210FA443B032684B39D16BB4092FB06168@THSNCOA06MXS02P.ONE-06.GRP> <012501cd9815$42b55e50$c8201af0$@yahoo.com> <012c01cd9818$1ca45060$55ecf120$@yahoo.com> <6830_1348470710_506007B6_6830_1428_1_E4DFA2E3210FA443B032684B39D16BB4092FB065BE@THSNCOA06MXS02P.ONE-06.GRP> <CADK3HHJJjDp-W4oVcuKY79s+df1qWJLSQ9B8pLwx-zHDBp2Qtw@mail.gmail.com> <6830_1348483308_506038EC_6830_5625_1_E4DFA2E3210FA443B032684B39D16BB4092FB6683E@THSNCOA06MXS02P.ONE-06.GRP> <003e01cd9a6c$2b6ea770$824bf650$@yahoo.com>

* 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