Re: the use of $$string$$

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: the use of $$string$$
Дата
Msg-id j9atp3$7ro$3@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на the use of $$string$$  (John Fabiani <johnf@jfcomputer.com>)
Список 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 по дате отправления:

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Number timestamped rows
Следующее
От: Tarlika Elisabeth Schmitz
Дата:
Сообщение: Re: GROUP and ORDER BY