Search Postgresql Archives

Re: Weird "LIKE" behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of Andy Chambers
> Sent: Friday, July 06, 2012 4:17 PM
> To: pgsql
> Subject:  Weird "LIKE" behaviour
> 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
> 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
> clients.

The only part of the table "dcm.providers" that should matter is the data
type of the "lname" column - which you have not provided.

David J.


Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:

[Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Programming PHP]     [Kernel Newbies]     [PHP Classes]     [Find Someone Nice]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

Add to Google Powered by Linux