Re: the use of $$string$$

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: the use of $$string$$
Date: 2011-11-08 09:46:11
Message-ID: j9atp3$7ro$3@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 2011-11-07, Richard Huxton <dev(at)archonet(dot)com> wrote:
> On 05/11/11 00:12, John Fabiani wrote:

> OK, so it seems psycopg is quoting your strings for you (as you'd
> expect). It's presumably turning your query into:
> ... values (E'123', $$E'<long string>'$$)
> So - the $$ quoting is unnecessary here - just use the % placeholders.
>
> Incidentally, should it be %s for the numeric argument?

psycopg2 seems to only accept %s as a place-holder, it's not printf it
just looks a bit like it.

--
⚂⚃ 100% natural

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2011-11-08 09:59:58 Re: GROUP and ORDER BY
Previous Message Jasen Betts 2011-11-08 09:36:12 Re: Number timestamped rows