Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGDTr-0006WD-V1 for pgsql-jdbc@postgresql.org; Mon, 24 Sep 2012 18:34:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGDTd-0007lP-Jo for pgsql-jdbc@postgresql.org; Mon, 24 Sep 2012 18:34:07 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8OIXmeI020517; Mon, 24 Sep 2012 14:33:48 -0400 (EDT) From: Tom Lane To: Maciek Sakrejda cc: David Johnston , Dave Cramer , GEISINGER Marc - Contractor , pgsql-jdbc@postgresql.org Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting? In-reply-to: References: <31630_1348140231_505AFCC7_31630_19463_1_E4DFA2E3210FA443B032684B39D16BB4092FB05DA1@THSNCOA06MXS02P.ONE-06.GRP> <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> <6830_1348483308_506038EC_6830_5625_1_E4DFA2E3210FA443B032684B39D16BB4092FB6683E@THSNCOA06MXS02P.ONE-06.GRP> <7861_1348487532_5060496C_7861_16928_1_E4DFA2E3210FA443B032684B39D16BB4092FB668CA@THSNCOA06MXS02P.ONE-06.GRP> <016701cd9a53$d4a1f7c0$7de5e740$@yahoo.com> <016d01cd9a5c$2fc6! aa30$8f53fe90$@yahoo.com> Comments: In-reply-to Maciek Sakrejda message dated "Mon, 24 Sep 2012 08:16:15 -0700" Date: Mon, 24 Sep 2012 14:33:47 -0400 Message-ID: <20516.1348511627@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/67 X-Sequence-Number: 23303 Maciek Sakrejda writes: > On Mon, Sep 24, 2012 at 6:54 AM, David Johnston 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