X-Original-To: pgsql-hackers@postgreSQL.org Received: from fuji.krosing.net (unknown [194.204.44.118]) by postgresql.org (Postfix) with ESMTP id E5930475C15; Mon, 10 Mar 2003 02:14:35 -0500 (EST) Received: from fuji.krosing.net (lo [127.0.0.1]) by fuji.krosing.net (8.12.7/8.12.7) with ESMTP id h2A7Ecq2003001; Mon, 10 Mar 2003 09:14:38 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.7/8.12.7/Submit) id h2A7EcXm002999; Mon, 10 Mar 2003 09:14:38 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: Cursors and backwards scans and SCROLL From: Hannu Krosing To: Tom Lane Cc: pgsql-hackers@postgreSQL.org, pgsql-sql@postgreSQL.org In-Reply-To: <21621.1047242111@sss.pgh.pa.us> References: <21621.1047242111@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1047280477.2892.11.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-1) Date: 10 Mar 2003 09:14:38 +0200 X-Archive-Number: 200303/334 X-Sequence-Number: 36580 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