pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: best way to fetch next/prev record based on index
Date: 28 Jul 2004 12:00:25 -0400
Message-ID: <87y8l4rujq.fsf@stark.xeocode.com> (raw)
In-Reply-To: <21449.1091023621@sss.pgh.pa.us>
References: <6EE64EF3AB31D5448D0007DD34EEB34101AEFF@Herge.rcsinc.local>
	<20040727204057.S28969@megazone.bigpanda.com>
	<87oem0u182.fsf@stark.xeocode.com>
	<21449.1091023621@sss.pgh.pa.us>


Tom Lane <tgl@sss.pgh.pa.us> writes:

> The only reason the code in parse_expr.c appears new is that the
> functionality used to be in gram.y.

Ah, that was what I was missing. Though it's odd since it seems there was code
in parse_expr.c to handle the "=" case specially.

> I'd like to see this fixed to comply with the spec, but given the lack
> of complaints about the existing behavior over so many years, ripping
> it out meanwhile doesn't seem appropriate.

I tried my hand at this last night and think I did an ok first pass. But I'm
missing one piece of the puzzle to get it to compile.

What do I need to know to be able to construct a List* suitable for passing as
the second arg to make_op() knowing only that I want to create a List* to
represent "=" or "<" or so on?

I also had another question I didn't ask in the other email. In the midst of a
forboth() loop, how would I tell if I'm at the last element of the lists?
Would lnext(l)==NULL do it?

-- 
greg




view thread (34+ messages)  latest in thread

Message-ID: <87y8l4rujq.fsf@stark.xeocode.com>
Permalink:  ../87y8l4rujq.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87y8l4rujq.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, sszabo@megazone.bigpanda.com, merlin.moncure@rcsonline.com
  Subject: Re: best way to fetch next/prev record based on index
  In-Reply-To: <87y8l4rujq.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox