pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Maciek Sakrejda <m.sakrejda@gmail.com>
Cc: David Johnston <polobo@yahoo.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: GEISINGER Marc - Contractor <Marc.GEISINGER@external.thalesgroup.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
Date: Mon, 24 Sep 2012 14:33:47 -0400
Message-ID: <20516.1348511627@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOtHd0BhXfjO1WGaSHsg-RnQ1Om8Vjds89ifEFagUrZxN7w-tg@mail.gmail.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>
	<CADK3HHLzaVJLgY8bptOOSK_RjWdrBVWpMC=eT-PH8YRu7deZBw@mail.gmail.com>
	<7861_1348487532_5060496C_7861_16928_1_E4DFA2E3210FA443B032684B39D16BB4092FB668CA@THSNCOA06MXS02P.ONE-06.GRP>
	<016701cd9a53$d4a1f7c0$7de5e740$@yahoo.com>
	<CADK3HHJVdWXx6kr0fHF8mc0Tq8__BXDV0M-PjC31C+f+-i6tVA@mail.gmail.com>
	<016d01cd9a5c$2fc6! aa30$8f53fe90$@yahoo.com>
	<CAOtHd0BhXfjO1WGaSHsg-RnQ1Om8Vjds89ifEFagUrZxN7w-tg@mail.gmail.com>

Maciek Sakrejda <m.sakrejda@gmail.com> writes:
> On Mon, Sep 24, 2012 at 6:54 AM, David Johnston <polobo@yahoo.com> wrote:
>> Is there any SQL syntax that allows for a dollar-sign outside of a string
>> literal?  If not then if we are not in a string and we encounter a
>> dollar-sign we could assume that we are dealing with a PostgreSQL string and
>> immediately return the original input unchanged.

> Identifiers can also contain "$" when quoted:

Identifiers can contain "$" even when not quoted ...

regression=# create table foo$ (bar$ int);
CREATE TABLE

I don't think that's per SQL spec, but PG allows it, mainly because some
other databases do.

			regards, tom lane




view thread (29+ messages)  latest in thread

Message-ID: <20516.1348511627@sss.pgh.pa.us>
Permalink:  ../20516.1348511627@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20516.1348511627@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, m.sakrejda@gmail.com, polobo@yahoo.com, pg@fastcrypt.com, Marc.GEISINGER@external.thalesgroup.com
  Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
  In-Reply-To: <20516.1348511627@sss.pgh.pa.us>
  References: <31630_1348140231_505AFCC7_31630_19463_1_E4DFA2E3210FA443B032684B39D16BB4092FB05DA1@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> <CADK3HHLzaVJLgY8bptOOSK_RjWdrBVWpMC=eT-PH8YRu7deZBw@mail.gmail.com> <7861_1348487532_5060496C_7861_16928_1_E4DFA2E3210FA443B032684B39D16BB4092FB668CA@THSNCOA06MXS02P.ONE-06.GRP> <016701cd9a53$d4a1f7c0$7de5e740$@yahoo.com> <CADK3HHJVdWXx6kr0fHF8mc0Tq8__BXDV0M-PjC31C+f+-i6tVA@mail.gmail.com> <CAOtHd0BhXfjO1WGaSHsg-RnQ1Om8Vjds89ifEFagUrZxN7w-tg@mail.gmail.com> <20516.1348511627@sss.pgh.pa.us>

* 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