Skip site navigation (1) Skip section navigation (2)

Re: like/ilike improvements

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: like/ilike improvements
Date: 2007-05-24 00:36:17
Message-ID: 4654DE01.7080604@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>   
>> We should only be able to get out of step from the "%_" case, I believe, 
>> so we should only need to do the first-byte test in that case (which is 
>> in a different code path from the normal "_" case. Does that seem right?
>>     
>
> At least put Assert(IsFirstByte()) in the main path.
>
> I'm a bit suspicious of the separate-path business anyway.  Will it do
> the right thing with say "%%%_" ?
>
> 	
>   

OK, Here is a patch that I am fairly confident does what's been 
discussed, as summarised by Tom.

To answer Guillaume's question - it probably won't apply cleanly to 8.2 
sources.

cheers

andrew



Attachment: like.patch
Description: text/x-patch (26.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2007-05-24 02:40:41
Subject: Article on 8.3 release on LWN.net
Previous:From: Tom LaneDate: 2007-05-23 23:27:13
Subject: Re: Possible to inline setof SQL UDFs?

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-05-24 03:59:37
Subject: Re: Concurrent psql patch
Previous:From: Tom LaneDate: 2007-05-23 16:07:10
Subject: Re: like/ilike improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group