Re: mac.c

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Larry Rosenman <ler(at)lerctr(dot)org>, pgsql-hackers(at)hub(dot)org
Subject: Re: mac.c
Date: 2000-08-07 18:05:10
Message-ID: 3.0.1.32.20000807110510.01419bc0@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 11:57 AM 8/7/00 -0400, Tom Lane wrote:
>Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-08-07 18:07:57 Re: UNIONS
Previous Message Hannu Krosing 2000-08-07 17:23:44 Re: Constraint stuff