Re: LIKE wildcards escaping problem - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: LIKE wildcards escaping problem
Date
Msg-id 46F7AFB3.80603@enterprisedb.com
Whole thread Raw
In response to LIKE wildcards escaping problem  (Thea <monika.morawiecka@gmail.com>)
List pgsql-hackers
Thea wrote:
> My problem is that PG behaves differently than other supported DBMSes
> (MSSQL and MySQL) - when I'm passing a query containing LIKE phrase to
> it, a double amount of '/' literals is needed to obtain expected
> result. I do realize that this is caused by a parser 'collapsing'
> double '/' to a single one.
> I might not express this clearly, but - as I understand it - in
> general result is that to find '/' literal in DB, '////' phrase is
> needed ('////' is turned to '//' by a parser, and that is valid
> expression for '/' literal in SQL itself).

You must be meaning \, the backslash character, not /. The setting
you're looking for is "standard_conforming_strings = on".

BTW: This question would've been more suited for the pgsql-general list,
pgsql-hackers is for discussing development of Postgres.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Thea
Date:
Subject: LIKE wildcards escaping problem
Next
From: Andrew Dunstan
Date:
Subject: Re: LIKE wildcards escaping problem