Re: [PATCH] Documentation: remove confusing paragraph about backslash escaping

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Hannes Frederic Sowa <hsowa(at)bfk(dot)de>, pgsql-hackers(at)postgresql(dot)org, Florian Weimer <fweimer(at)bfk(dot)de>
Subject: Re: [PATCH] Documentation: remove confusing paragraph about backslash escaping
Date: 2012-02-27 23:10:39
Message-ID: 21142.1330384239@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Feb 27, 2012 at 10:17 AM, Hannes Frederic Sowa <hsowa(at)bfk(dot)de> wrote:
>> As with recent changes to `standard_conforming_strings' the paragraph about
>> backslash escaping in the description of `LIKE' is only confusing. Thus I
>> attached a patch to remove it.

> I think I agree with removing this paragraph; it made sense when
> standard_conforming_strings=off was the default, but that's not so
> anymore. We could come up with some alternative text to insert here
> but I think that might be unnecessarily long-winded.

On a closer look, I see three different places in the
functions-matching.html page that talk about doubling backslashes, of
which this one might be the least bogus, since it at least provides
a cross-reference to someplace where you would read about
standard_conforming_strings.

I suggest replacing the first and third cases with something along the
lines of

Note: if you have standard_conforming_strings turned off, any
backslashes you write in literal string constants will need to be
doubled. See Section 4.1.2.1 for more information.

The second case is just a parenthetical comment and perhaps could be
removed.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-02-27 23:20:20 Re: Trigger execution role (was: Triggers with DO functionality)
Previous Message Kevin Grittner 2012-02-27 23:02:24 Re: Trigger execution role (was: Triggers with DO functionality)