Re: efficiency of wildcards at both ends

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: efficiency of wildcards at both ends
Date: 2012-06-20 18:11:16
Message-ID: BLU0-SMTP141146622E6CA8EC9AAA7A7CFFE0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em 20/06/2012 15:03, John R Pierce escreveu:
> On 06/20/12 10:37 AM, Edson Richter wrote:
>>
>> select * from tb1
>> where nome like 'CARLOS%' or reverse(nome) like reverse('%CARLOS')
>>
>> Should return same results as
>> select * from tb1
>> where nome like '%CARLOS%'
>
> no, that won't match 'abcCARLOSxyx'
>
>
>
Perfect. I did not realized this case.

Thanks,

Edson.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bosco Rama 2012-06-20 19:13:21 Re: Simple method to format a string?
Previous Message hubert depesz lubaczewski 2012-06-20 18:06:46 Re: How to determine to which version of PostgreSQL a patch was applied