Re: Hmm, nodeUnique doesn't really support backwards scan too well

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Hmm, nodeUnique doesn't really support backwards scan too well
Date: 2008-08-06 04:14:09
Message-ID: 1217996049.4549.126.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Tue, 2008-08-05 at 18:00 -0500, Jaime Casanova wrote:
> On 8/5/08, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bhaskar Sirohi 2008-08-06 11:49:08 Re: BUG #4339: The postgreSQL service stops abnormally
Previous Message Jaime Casanova 2008-08-05 23:00:10 Re: Hmm, nodeUnique doesn't really support backwards scan too well