Re: [HACKERS] SELECT ... LIMIT (trial implementation)

Поиск
Список
Период
Сортировка
От jwieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] SELECT ... LIMIT (trial implementation)
Дата
Msg-id m0zUyPa-000EBPC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] SELECT ... LIMIT (trial implementation)  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
Oleg Bartunov wrote:

>
> Jan,
>
> I tested your patch on my Linux box and it works ok, except
> aggregates functions doesn't work properly, for example
> count(*) always produces 0

    They work absolutely properly :-)

>
> kdo=> select count(*)  from work_flats limit 10,1000;
> count
> -----
> (0 rows)

    As  I  wrote,  the  executor  skips final result rows. In the
    obove query, there is only one result row (the  one  returned
    by the aggregate function). You asked the executor to skip it
    and it did.

    We cannot limit selections in deeper levels than the top one.
    This would give unpredictable results in joins.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] backslash in psql output
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] SELECT ... LIMIT (trial implementation)