Re: [HACKERS] MIN not defined for OID types

From: Roland Roberts <roberts(at)panix(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] MIN not defined for OID types
Date: 1998-09-05 15:56:21
Message-ID: x6yaryo8nu.fsf@tycho.rlent.pnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Thomas" == Thomas G Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:

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

Yes, well, in this case, it comes about as a result of trying to make
something database independent. Keystone has functions for both
PostgreSQL and MySQL, and the MySQL way of doing things seems to be
limitation. As a result, the DB-independent code does a "select *
from <table>" then queries to find what the column names are.
Obviously, we don't need to do it that way with PostgreSQL. My "hack"
was to change the query so it wouldn't pull back the whole table just
to find the column names, so I did a "select * from <table> where
oid=min(oid)".

I have no idea how useful the function is in general, but it still
seems like an obvious hole to not be able to ask what the min of a
numeric column is. I can ask what the min(rowid) is in Oracle (but
don't get me started on Oracle's abysmal "support"...ack!).

roland
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNfFfI+oW38lmvDvNAQFI4gP/cCV6JCVmyBiQQqB4GI4lRAMCdbfTI7Wi
4gtMrHqvy9ct6S2UKbXZFREfVduRzfM9kwxaEw6W5BbcXdaSKQCgoAQrhohMLRtq
IhcTT0CAqbYuF8oy0cxeHq7EI/nJumXhbxk11ZHFYwsxBFKoxjKqGuzP9GExiAQ5
P5y78KFJhzQ=
=NB6u
-----END PGP SIGNATURE-----
--
Roland B. Roberts, PhD Custom Software Solutions
roberts(at)panix(dot)com 101 West 15th St #4NN
New York, NY 10011

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-09-05 17:28:22 new office webcam
Previous Message Roland Roberts 1998-09-05 15:35:31 Re: [HACKERS] MIN not defined for OID types