Re: Select with backslash '\' character

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andy Hallam" <ahm(at)exel(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Select with backslash '\' character
Date: 2001-10-29 18:42:59
Message-ID: 10791.1004380979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Andy Hallam" <ahm(at)exel(dot)co(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-10-29 18:49:50 Re: Problems when inserting a very large sequence of records
Previous Message Tom Lane 2001-10-29 18:15:58 Re: Bug #500: Cannot create View and Problems With the UNION clause