Gregory Stark wrote: > Tom Lane <[EMAIL PROTECTED]> writes: > > > I believe a better way to think about this would be as an aggregate that > > remembers the top N rows. > > Wouldn't such a thing just be a reimplementation of a tuplestore though? I > mean, it's storing tuples you feed it, sorting them, and spitting them back > out in sorted order.
I don't know if this is the same thing you are talking about, but Oleg talked to me on the conference about "partial sort", which AFAICS it's about the same thing you are talking about. I think Teodor submitted a patch to implement it, which was rejected because of not being general enough. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster