Re: How to escape apostrophes when apostrophes already used to escape something else

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to escape apostrophes when apostrophes already used to escape something else
Date: 2010-02-05 14:45:34
Message-ID: 20100205144534.GE5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 05, 2010 at 10:13:21AM +0100, Stefan Schwarzer wrote:
> probably not too complicated, but although googling my way through
> many pages, I don't find the solution.
>
> I have a query which uses already an apostrophe to escape something
> else:

Not sure if "dollar quoting" may be easier for you here. Have a look
at:

http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING

--
Sam http://samason.me.uk/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message RW 2010-02-05 14:49:16 Re: Idle in Transaction
Previous Message Mark Watson 2010-02-05 13:41:13 Dynamic SQL, Return Query Execute with Join