Re: the use of $$string$$ - Mailing list pgsql-sql

From Jasen Betts
Subject Re: the use of $$string$$
Date
Msg-id j9atp3$7ro$3@reversiblemaps.ath.cx
Whole thread Raw
In response to the use of $$string$$  (John Fabiani <johnf@jfcomputer.com>)
List pgsql-sql
On 2011-11-07, Richard Huxton <dev@archonet.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



pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Number timestamped rows
Next
From: Tarlika Elisabeth Schmitz
Date:
Subject: Re: GROUP and ORDER BY