dollar quoting and pg_dump

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема dollar quoting and pg_dump
Дата
Msg-id 40605306.5040603@dunslane.net
обсуждение исходный текст
Ответы Re: dollar quoting and pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I had a brief look at this today. Basically, I thought of adding a new 
routine to dumputils.c thus:
   void appendStringLiteralDQ(PQExpBuffer buf, const char *str, const 
char *dqprefix)

and using it in dumping function bodies and comments on all objects, 
with a prefix argument of "function" and "comment" respectively. There 
might be other places where we want to use dollar quoting, but this 
would be a good start, ISTM.

Basically, this routine would start with $ (+ dqprefix if not null) and 
then keep adding characters (in turn "_1234567890") until that string 
was not found in str, then appending "$" and using that as the delimiter.

Thoughts?

cheers

andrew




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shachar Shemesh
Дата:
Сообщение: postgres on windows page update
Следующее
От: Tom Lane
Дата:
Сообщение: Re: dollar quoting and pg_dump