Re: dollar quoting and pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dollar quoting and pg_dump
Дата
Msg-id 21156.1080058965@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: dollar quoting and pg_dump  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: dollar quoting and pg_dump  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> A thought: maybe just put this logic into the regular
>> appendStringLiteral routine, and trigger it when the string contains any
>> quotes or backslashes; if it has none, you can just use quotes ...

> I did think of fallback, but rejected it on the KISS principle :-)  I 
> also prefer consistency in style - I want all my functions dollar quoted 
> even if they don't currently contain characters in need of escape.

Good point.  Never mind that idea then.

>> Might be a good idea to make it disablable with a
>> fallback to regular quoting.

> Makes sense. "-X disable-dollar-quoting"? Or we could have it turned off 
> by default and require it to be specifically turned on - that might 
> conform to the principle of least surprise, at least for now.

I don't mind if it's on by default; just thinking that some people might
appreciate a way to turn it off.  "-X disable-dollar-quoting" sounds
fine.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: dollar quoting and pg_dump
Следующее
От: Sailesh Krishnamurthy
Дата:
Сообщение: Re: linked list rewrite