mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Support hashing for duplicate-elimination in INTERSECT and EXCEPT queries.
This completes my project of improving usage of hashing for duplicate elimination (aggregate functions with DISTINCT remain undone, but that's for some other day). As with the previous patches, this means we can INTERSECT/EXCEPT on datatypes that can hash but not sort, and it means that INTERSECT/EXCEPT without ORDER BY are no longer certain to produce sorted output.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.397 2008/08/07 01:11:46 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.398 2008/08/07 03:04:03 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -652,10 +652,12 @@ _copySetOp(SetOp *from)
|
||||
* copy remainder of node
|
||||
*/
|
||||
COPY_SCALAR_FIELD(cmd);
|
||||
COPY_SCALAR_FIELD(strategy);
|
||||
COPY_SCALAR_FIELD(numCols);
|
||||
COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
|
||||
COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
|
||||
COPY_SCALAR_FIELD(flagColIdx);
|
||||
COPY_SCALAR_FIELD(numGroups);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user