agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Jeff Sidell <jsidell@postgres.Berkeley.EDU>
To: Joe Hellerstein <jmh@cs.berkeley.edu>
Cc: POSTGRES database manager <postgres@postgres.Berkeley.EDU>
Subject: Re: b-tree bug?
Date: Wed, 1 May 1996 11:16:15 -0700 (PDT)
Message-ID: <199605011816.LAA01344@parkcity.CS.Berkeley.EDU> (raw)
In-Reply-To: <2.2.32.19960501171507.0091ee60@postgres.berkeley.edu>
>
> Well, last time I checked, postgres officially assigned no semantics to
> duplicates, so it's *just* possible that everything officially is working
> "right" in your example, because postgres aggregates are semantically
> meaningless in the face of duplicates. But that's probably not what's going on.
>
I'm not sure what the official semantics for aggregates/aggregates-over-
duplicates are, but unless I'm missing something, there's a bug:
The aggregate node takes tuples passed in to it from the subplan
and calls the appropriate function for each such tuple. Count() simply
adds one to a running count. The fact that we're getting different
counts for an underlying index scan and a sequential scan indicates
that they are retrieving different numbers of tuples.
Semantically, "select count(*) from LINEITEM where L_SHIPDATE >= D1
and L_SHIPDATE < D2" means "Tell me how many tuples in the LINEITEM
table have a shipdate D such that D1 <= D <= D2". Not "how many
*unique* tuples" or "how many tuples with unique shipdates".
Jeff
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: jsidell@postgres.Berkeley.EDU, jmh@cs.berkeley.edu
Subject: Re: b-tree bug?
In-Reply-To: <199605011816.LAA01344@parkcity.CS.Berkeley.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox