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

From: jwieck(at)debis(dot)com (Jan Wieck)
To: oleg(at)sai(dot)msu(dot)su (Oleg Bartunov)
Cc: jwieck(at)debis(dot)com, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] SELECT ... LIMIT (trial implementation)
Date: 1998-10-18 19:22:42
Message-ID: m0zUyPa-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-10-18 19:29:43 Re: [HACKERS] SELECT ... LIMIT (trial implementation)
Previous Message Bruce Momjian 1998-10-18 18:29:13 Re: [HACKERS] backslash in psql output