pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: Cursors and backwards scans and SCROLL
Date: Mon, 10 Mar 2003 18:20:33 +0900
Message-ID: <3E6C58E1.D7642B4@tpf.co.jp> (raw)
References: <21621.1047242111@sss.pgh.pa.us>

Tom Lane wrote:
> 
> However, this is going to create backwards-compatibility issues.
> We have a few options for what to do:
> 
> 1. Enforce the SQL spec requirement: error out if backwards fetch is
> done when SCROLL wasn't given.  But this will surely break a lot
> of existing applications that work perfectly well.
> 
> 2. Error out only if a backwards fetch is actually attempted on a plan
> tree that can't handle it (which could only happen if SCROLL wasn't
> given).  This is efficient and flexible, but it exposes implementation
> details to the user, in that whether an error occurs will depend on
> which plan the system happens to choose.  There are cases where
> identical cursor definitions might allow or not allow backwards fetch
> depending on the planner's choices.  Notice though that errors could
> occur only in cases that would silently fail in the present code; so
> existing applications that work reliably would not see such errors.
> 
> 3. Create a runtime parameter (GUC variable) which when set causes us
> to assume SCROLL is present even if it's not stated.  Setting this
> to TRUE would allow existing applications to work without modification;
> when it's FALSE, we'd enforce the spec behavior.  The trouble with this
> is the TRUE setting would likely cause materialization costs to be paid
> in very many situations where the client has no intention of fetching
> backwards.

The change seem worth neither #1 nor #3.

regards,
Hiroshi Inoue
	http://www.geocities.jp/inocchichichi/psqlodbc/



view thread (15+ messages)  latest in thread

Message-ID: <3E6C58E1.D7642B4@tpf.co.jp>
Permalink:  ../3E6C58E1.D7642B4@tpf.co.jp/
Also on:    postgresql.org/message-id/3E6C58E1.D7642B4@tpf.co.jp

 · 

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: Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
  Subject: Re: Cursors and backwards scans and SCROLL
  In-Reply-To: <3E6C58E1.D7642B4@tpf.co.jp>

* 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