Re: Select with backslash '\' character - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Select with backslash '\' character
Date
Msg-id 10791.1004380979@sss.pgh.pa.us
Whole thread Raw
In response to Select with backslash '\' character  ("Andy Hallam" <ahm@exel.co.uk>)
List pgsql-bugs
"Andy Hallam" <ahm@exel.co.uk> writes:
> SELECT a FROM b WHERE c = 'WORKGROUP\me'
> Does not return any rows.
> SELECT a FROM b WHERE c = 'WORKGROUP\\me'
> Returns required rows.

> Can someone confirm this to be a bug please.

This is not a bug.  Backslash is an escape character in Postgres'
string literals, therefore you gotta double it to get a single
backslash into the actual data.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #500: Cannot create View and Problems With the UNION clause
Next
From: Tom Lane
Date:
Subject: Re: Problems when inserting a very large sequence of records