Re: dollar quoting and pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dollar quoting and pg_dump
Date: 2004-03-23 16:22:45
Message-ID: 21156.1080058965@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sailesh Krishnamurthy 2004-03-23 16:39:21 Re: linked list rewrite
Previous Message Marc G. Fournier 2004-03-23 16:20:24 pg_dump locks a table on dumping ... ?

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-03-23 18:20:49 Re: [HACKERS] Two-phase commit
Previous Message Heikki Linnakangas 2004-03-23 16:10:35 Re: Two-phase commit