Re: [HACKERS] MIN not defined for OID types

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] MIN not defined for OID types
Date: 1998-09-05 05:19:03
Message-ID: 35F0C9C7.19D9FC8D@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > select min(oid) from pg_class;
> > ERROR: function min(oid) does not exist
> > I got this surprise while trying to optimize a hack for the
> > PostgreSQL functions in Keystone
> > (http://www.stonekeep.com/keystone).
> Is this in 6.4 or 6.3.2? I think 6.4 may be able to do this, and if
> not, perhaps Thomas can add it. Sounds like a good use for
> binary-compatable operators.
> Thomas, can we delete the old operators now that the binary compatable
> stuff works? Just an idea, not sure if it is do-able.

It is do-able, but I'm not sure it is desirable. If there is an exact
function or operator match, then that would be preferred, right? The
"binary-compatible" is a cheat to help performance and to allow us to
not have to define _every_ possible combination of functions and
operators. So it's helped on some things, but probably shouldn't become
the only mechanism. For one thing, if you change the underlying
implementation of a type, then it would not longer be binary compatible
with a second one, and you would need the explicit functions and
operators anyway.

I didn't change any of the type matching behavior of the aggregate
functions that I can recall. Maybe I should have; if I have time I'll
look at it. That would probably be better than bothering to implement
something explicitly for oids:

postgres=> select min(oid) from foo;
ERROR: No such function 'min' with the specified attributes

Also, it's a bit hard to get too excited about a missing feature to
allow someone to "optimize a hack" Isn't that like "patching a patch" or
"fixing a repair"? :)

- Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1998-09-05 05:40:43 Re: [HACKERS] Adding PRIMARY KEY info
Previous Message Bruce Momjian 1998-09-05 04:37:23 Re: [HACKERS] MIN not defined for OID types