Re: Unable to prepare a statement when the object names contain more than one $ symbol - Mailing list pgsql-jdbc

From Gregory Stark
Subject Re: Unable to prepare a statement when the object names contain more than one $ symbol
Date
Msg-id 87ejjgze7v.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Altaf Malik <mmalik_altaf@yahoo.com>)
List pgsql-jdbc
"Altaf Malik" <mmalik_altaf@yahoo.com> writes:

> I think $$ should start a quote instead of $x$. Or $ character have special
> meaning but if there is one dollar does not happen anything wrong. Are $$ and
> $x$ equal? If yes, what happens with the character(s) between the two dollar
> signs?

$anything$ starts a quote and ends with $anything$ as in:

postgres=# select $foo$bar$foo$;
 ?column?
----------
 bar
(1 row)


However the $ must start a new token:

postgres=# select foo$foo$bar$foo$;
ERROR:  column "foo$foo$bar$foo$" does not exist
LINE 1: select foo$foo$bar$foo$;


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


pgsql-jdbc by date:

Previous
From: Altaf Malik
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Next
From: Michael Paesold
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol