pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeroen T. Vermeulen <jtv@xs4all.nl>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Cursors and backwards scans and SCROLL
Date: Mon, 10 Mar 2003 10:41:33 -0500
Message-ID: <17531.1047310893@sss.pgh.pa.us> (raw)
In-Reply-To: <20030310153245.GW98248@xs4all.nl>
References: <21621.1047242111@sss.pgh.pa.us>
	<20030310153245.GW98248@xs4all.nl>

"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:
>> There are cases where
>> identical cursor definitions might allow or not allow backwards fetch
>> depending on the planner's choices.

> Would it be possible to give warnings in a narrow superset of the
> problematic cases, something along the lines of "I'm scrolling backwards
> for you now, but there's no reason why that should work on this same query 
> tomorrow"?

I don't see a practical way to do that --- that little bit of warning
code would have to embed a lot of fragile assumptions about the set of
alternatives searched by the planner.  It would probably break every
time we improved the planner.  And the breakage would consist either of
failing to give a warning when one is appropriate, or giving a warning
when no other plan is really likely to be chosen; neither of which are
going to be easily noticed or tested for.  Seems like a losing game :-(

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <17531.1047310893@sss.pgh.pa.us>
Permalink:  ../17531.1047310893@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17531.1047310893@sss.pgh.pa.us

 · 

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jtv@xs4all.nl, pgsql-hackers@postgresql.org
  Subject: Re: Cursors and backwards scans and SCROLL
  In-Reply-To: <17531.1047310893@sss.pgh.pa.us>

* 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