Re: BUG #4398: Backslashes get escaped despite of backslash_quote=off - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4398: Backslashes get escaped despite of backslash_quote=off
Date
Msg-id 23710.1220543502@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4398: Backslashes get escaped despite of backslash_quote=off  ("Rainer" <rainer@hamburg.ccc.de>)
Responses Re: BUG #4398: Backslashes get escaped despite of backslash_quote=off
List pgsql-bugs
"Rainer" <rainer@hamburg.ccc.de> writes:
> Description:        Backslashes get escaped despite of backslash_quote=off

Aren't you looking for standard_conforming_strings?  backslash_quote is
something else entirely, and doesn't actually do anything at all when
backslash escaping is disabled.

> Two questions:
> 1. What I actually want: Shouldn't the second statement work by
> documentation without the escape flag?

No.  standard_conforming_strings has nothing to do with the behavior of
LIKE (nor does backslash_quote).  They just control the initial parsing
of SQL string literals.

> 2. What I do not understand: Why does the fourth statement return a result
> as backslash_quote is off?

It looks like a perfectly good match to me.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4397: crash in tab-complete.c
Next
From: "Denis Mitin"
Date:
Subject: Re: BUG #4389: FATAL: could not reattach to shared memory(key=1804, addr=018E0000): 487