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

Re: Bug in ILIKE?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Bug in ILIKE?
Date: 2008-09-26 03:35:56
Message-ID: 48DC589C.4010705@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>   
>> The docs actually don't state what are the semantics of escape followed 
>> by something that is not escape or a metachar. Does the spec say 
>> anything about that?
>>     
>
> The spec says it's an error, per the SQL92 excerpt I quoted in the
> previous thread.  (SQL99 says about the same with more notation;
> I didn't bother looking in the later specs.)
>
> I find that position too restrictive, mainly because of this
> consideration: suppose some future version of the spec invents
> additional metacharacters.  To be concrete, suppose ? means
> something special in SQL2010.  Now how do you make a pattern that
> works in both older and newer servers?  \? means literal ? to the
> newer server, but if it throws an error on the older, you're stuck.
>
> So I'm for the definition that escape-anything means exactly anything,
> without any special treatment that it would otherwise have.  And in
> the case of ILIKE it seems like "no special treatment" should mean
> "case insensitive match".
>   

Well, it looks to me to be pretty easily fixable. Given the above it 
seems to me marginal to call it a bug, though. I don't have very strong 
feelings, but I am generally opposed to changing the visible behaviour 
in stable releases unless something is clearly a bug.

cheers

andrew
> 			regards, tom lane
>
>   

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-09-26 03:45:55
Subject: Re: Bug in ILIKE?
Previous:From: Robert HaasDate: 2008-09-26 03:34:47
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches

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