RE: CURSOR after hitting end

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема RE: CURSOR after hitting end
Дата
Msg-id 000801bf9e91$d42f9d40$2801007e@tpf.co.jp
обсуждение исходный текст
Ответ на Re: CURSOR after hitting end  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
> -----Original Message-----
> From: pgsql-hackers-owner@hub.org [mailto:pgsql-hackers-owner@hub.org]On
> Behalf Of Bruce Momjian
> 
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > We have this in the CURSOR documentation:
> > >        Once  all  rows  are  fetched,  every  other  fetch access
> > >        returns no rows.
> > 
> > > Is this still true?
> > 
> > Not if you then move or fetch backwards, I should think...
> 
> No, it works.  I think Tatsuo fixed it.  After a FETCH ALL, I did this,
> and it worked:
>

This is true and false.
For index scan I fixed it before 6.5 and for sequential scan
I fixed it before 7.0.

However there remains some type of scan that returns no rows
after hitting end.
Especially for GROUP BY,*fetch backward* doesn't work well 
fundamentally.  I have known this but I've never seen bug
reports for this.  It's not so easy to fix this and it wouldn't be
an effective way to scan base relation again for *GROUP BY*.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Indexes growing continuously
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: No one parent tuple was found