pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-sql@postgreSQL.org
Subject: Re: Cursors and backwards scans and SCROLL
Date: 10 Mar 2003 09:14:38 +0200
Message-ID: <1047280477.2892.11.camel@fuji.krosing.net> (raw)
In-Reply-To: <21621.1047242111@sss.pgh.pa.us>
References: <21621.1047242111@sss.pgh.pa.us>

Tom Lane kirjutas P, 09.03.2003 kell 22:35:

> 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.

We could start by issuing a NOTICE/WARNING as a step towards the strict
compliance and provide a GUC variable for those who are unable to cope
even with the warning.

The warning could be issued at two places - 

1. ( more annoying ) issue it at cursor creation time when a plan is
chosen that can't be fetched backwards.

2. like your #2, but just give a warning and then run the underlying
query _again_, this toime with materialize on top and also do a Move to
reposition the cursor. This will probably not work correctly for all
tranasaction isolation levels though but it will penalize only these
cases that absolutely need it. The penalty will of course be heavier ;(

-----------------
Hannu




view thread (15+ messages)  latest in thread

Message-ID: <1047280477.2892.11.camel@fuji.krosing.net>
Permalink:  ../1047280477.2892.11.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1047280477.2892.11.camel@fuji.krosing.net

 · 

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: hannu@tm.ee, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
  Subject: Re: Cursors and backwards scans and SCROLL
  In-Reply-To: <1047280477.2892.11.camel@fuji.krosing.net>

* 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