Re: LIKE wildcards escaping problem

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Thea" <monika(dot)morawiecka(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LIKE wildcards escaping problem
Date: 2007-09-24 12:38:11
Message-ID: 46F7AFB3.80603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-09-24 12:41:18 Re: LIKE wildcards escaping problem
Previous Message Andrew Dunstan 2007-09-24 12:16:24 Re: CREATE DATABASE cannot be executed from a function or multi-command string