Re: [HACKERS] Cursors and backwards scans and SCROLL

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [HACKERS] Cursors and backwards scans and SCROLL
Дата
Msg-id 1047280477.2892.11.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Cursors and backwards scans and SCROLL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "mark carew"
Дата:
Сообщение: Re: Insert multiple Rows
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: Could someone please sort out the e-mail to news gateway!