Re: Getting row with id=max(id) - Mailing list pgsql-sql

From Alex Pilosov
Subject Re: Getting row with id=max(id)
Date
Msg-id Pine.BSO.4.10.10106071550070.5424-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: Getting row with id=max(id)  (Gerald Gutierrez <gml1@coldresist.com>)
List pgsql-sql
On Thu, 7 Jun 2001, Gerald Gutierrez wrote:

> Perhaps if the server internally rewrote the second query into the first, 
> it would make the intuitive version much faster. The same can be done for 
> min() and perhaps other functions as well.

Unfortunately, currently that's not possible, because of the design of
aggregate functions (they are pluggable, and the API for aggregate
functions has no support for understanding that an index may be used to
compute an aggregate). It'd be nice for a TODO item...:

-alex



pgsql-sql by date:

Previous
From: Gerald Gutierrez
Date:
Subject: Re: Getting row with id=max(id)
Next
From: Dennis
Date:
Subject: Forein Key Problem