pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Altaf Malik <mmalik_altaf@yahoo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Cc: mpaesold@gmx.at
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Date: Tue, 10 Jul 2007 12:32:20 +0100
Message-ID: <87ejjgze7v.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <322907.85878.qm@web39109.mail.mud.yahoo.com>
References: <322907.85878.qm@web39109.mail.mud.yahoo.com>

"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




view thread (12+ messages)  latest in thread

Message-ID: <87ejjgze7v.fsf@oxford.xeocode.com>
Permalink:  ../87ejjgze7v.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87ejjgze7v.fsf@oxford.xeocode.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: stark@enterprisedb.com, mmalik_altaf@yahoo.com, tgl@sss.pgh.pa.us, books@ejurka.com, mpaesold@gmx.at
  Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
  In-Reply-To: <87ejjgze7v.fsf@oxford.xeocode.com>
  References: <322907.85878.qm@web39109.mail.mud.yahoo.com> <87ejjgze7v.fsf@oxford.xeocode.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