Re: BUG #6314: The like command does not handle a long string of special chars - Mailing list pgsql-bugs

From Magnus Hagander
Subject Re: BUG #6314: The like command does not handle a long string of special chars
Date
Msg-id CABUevEzjnV=-3eub8W+=ZeXfyDXcCO=pMGC2iXvvqKvGnbCwwg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #6314: The like command does not handle a long string of special chars  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thursday, December 1, 2011, Tom Lane wrote:

> d.rericha@healthcareoss.com <javascript:;> writes:
> > Simply set a varchar field in your db to the following string:
> > !"#$%'()*+,-/:;=?@[\]^_`{|}~0000&<>
>
> > I know, I know, who would do this, right? Well, its for a certification.
> > The like command works fine up with escapes up to:
> > !"#$%''()*+,-/:;=?@[%
>
> Doesn't match for me, rather unsurprisingly since this string contains
> two occurrences of "'" not one.
>
> > Notice, I added the % to the end. However, if you go any further - no
> > matches:
> > !"#$%''()*+,-/:;=?@[\\%
> > Strangely, this works and shouldn't:
> > !"#$%''()*+,-/:;=?@[\%
>
> It's hard to tell for sure, since you've presented a garbled
> interpretation of what you did rather than showing us exactly what you
>

A fair amount of that garbling is unfortunately the fault of a bug in the
new website code that applied HTML escapes to plaintext emails, which in
the end caused double escaping. I've just pushed a fix for this, so from
now on bugreports won't do that.




--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

pgsql-bugs by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: 9.1.1 hot standby startup gets sigbus
Next
From: Tom Lane
Date:
Subject: Re: BUG #6318: pg_dump for non-template languages is broken