Re: Hmm, nodeUnique doesn't really support backwards scan too well - Mailing list pgsql-bugs

From Simon Riggs
Subject Re: Hmm, nodeUnique doesn't really support backwards scan too well
Date
Msg-id 1217996049.4549.126.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Hmm, nodeUnique doesn't really support backwards scan too well  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
List pgsql-bugs
On Tue, 2008-08-05 at 18:00 -0500, Jaime Casanova wrote:
> On 8/5/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Simon Riggs <simon@2ndquadrant.com> writes:
> > > I've never seen anyone scan backwards like this at all in practical use.
> >
> > > I knew it was possible, but never seen it done.
> >
> > > It seems entirely probable nobody else has either. It's a PostgreSQL
> > > extension, so people arriving from outside don't even know it exists,
> >
> > Say again?  Both the SCROLL option to DECLARE CURSOR and FETCH PRIOR are
> > straight out of the SQL92 spec.

Yep. I was talking about FETCH BACKWARDS n | ALL
though forgot that this is the same thing as FETCH PRIOR.

But even use of FETCH PRIOR is fairly rare, so IMHO your proposal is
still safe.

> i think Simon is talking about DISTINCT ON

No, don't confuse things!

That is rare also, but I know of various places that is used.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support

pgsql-bugs by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: Hmm, nodeUnique doesn't really support backwards scan too well
Next
From: "Bhaskar Sirohi"
Date:
Subject: Re: BUG #4339: The postgreSQL service stops abnormally