Weird "LIKE" behaviour - Mailing list pgsql-general

From Andy Chambers
Subject Weird "LIKE" behaviour
Date
Msg-id CAAfW55r9LV-32m7z7tvFbQ2tpBrVt9MWz_+BC_L-Vdqgc8HMag@mail.gmail.com
Whole thread Raw
Responses Re: Weird "LIKE" behaviour  ("David Johnston" <polobo@yahoo.com>)
List pgsql-general
Below are two queries that should be pretty much the same but with the
first one, I'm trying to boil it down to a minimal test-case so I
don't have to export the table definition of dcm.providers.  The first
one returns nothing but at least executes the query.

=> create table foo ( foo text );
=> select * from foo where foo like 'FOO%\'

The second one fails to execute the query...

=> select * from dcm.providers where lname like 'FOO%\'
ERROR:  LIKE pattern must not end with escape character

Our server is 9.1.4 and can reproduce this behaviour with either 8.4
or 9.1 clients.

--
Andy Chambers
Software Engineer
(e) achambers@mcna.net
(t) 954-682-0573

CONFIDENTIALITY NOTICE: This electronic mail may contain information
that is privileged, confidential, and/or otherwise protected from
disclosure to anyone other than its intended recipient(s). Any
dissemination or use of this electronic mail or its contents by
persons other than the intended recipient(s) is strictly prohibited.
If you have received this communication in error, please notify the
sender immediately by reply e-mail so that we may correct our internal
records. Please then delete the original message. Thank you.

pgsql-general by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: Primary key vs unique index
Next
From: "David Johnston"
Date:
Subject: Re: Weird "LIKE" behaviour