mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
From: Darren King <darrenk@insightdist.com>
I have always been under the impression that NULL is not equal to NULL and that NULL is not equal to anything else either. If this is the case, then this patch is correct. If NULL _is_ equal to NULL, then I think there are other problems in the Group By logic.
This commit is contained in:
parent
d57753efd4
commit
20e11f2909
@ -13,7 +13,7 @@
|
|||||||
* columns. (ie. tuples from the same group are consecutive)
|
* columns. (ie. tuples from the same group are consecutive)
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.11 1997/10/27 12:00:43 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.12 1998/01/26 00:21:02 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -415,8 +415,11 @@ sameGroup(TupleTableSlot *oldslot,
|
|||||||
|
|
||||||
if (isNull1 == isNull2)
|
if (isNull1 == isNull2)
|
||||||
{
|
{
|
||||||
if (isNull1) /* both are null, they are equal */
|
/* both are null, they are _not_ equal since
|
||||||
continue;
|
* NULL is not equal to NULL (or anything).
|
||||||
|
* -- 25 Jan 1998 -- darrenk */
|
||||||
|
if (isNull1)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
val1 = fmgr(typoutput, attr1,
|
val1 = fmgr(typoutput, attr1,
|
||||||
gettypelem(tupdesc->attrs[att - 1]->atttypid));
|
gettypelem(tupdesc->attrs[att - 1]->atttypid));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user