Re: mac.c - Mailing list pgsql-hackers

From Don Baccus
Subject Re: mac.c
Date
Msg-id 3.0.1.32.20000807110510.01419bc0@mail.pacifier.com
Whole thread Raw
In response to Re: mac.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 11:57 AM 8/7/00 -0400, Tom Lane wrote:
>Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> Why not implement like() and notlike() for macaddr data types which (if
>> both args are macaddr) will compare on manufacturer's fields alone? That
>> would seem to get all the functionality you might want.
>
>That seems like an entirely unjustified overloading of the "LIKE"
>operator.  I don't see any reason why someone would expect a string-
>pattern-match operator to have the semantics of "compare the
>manufacturer part only" when applied to macaddr.

It seems really unintuitive, breaking the "law of least astonishment",
since it isn't really at all like "LIKE".  Which, after all, does an
exact match unless you wildcard.

I would think the trend would be to reduce items in the kludge bucket,
not add to them.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: UNIONS
Next
From: Stephan Szabo
Date:
Subject: Re: Constraint stuff