index c11427a1f66c6734254623d763c3532396e149d2..01f6d2001e12dfb9003deb82de2f82becd90d003 100644 (file)
@@ -225,9 +225,8 @@ BuildTupleHashTableExt(PlanState *parent,
allow_jit = metacxt != tablecxt;
/* build comparator for all columns */
- /* XXX: should we support non-minimal tuples for the inputslot? */
hashtable->tab_eq_func = ExecBuildGroupingEqual(inputDesc, inputDesc,
- &TTSOpsMinimalTuple, &TTSOpsMinimalTuple,
+ NULL, &TTSOpsMinimalTuple,
numCols,
keyColIdx, eqfuncoids, collations,
allow_jit ? parent : NULL);
index a9e136ca900ca34eaa3254d8220b2a3a2aaab06f..e772f1d3858e3ea588070e9aeec707e5a94525b2 100644 (file)
@@ -636,6 +636,21 @@ SELECT t1.id, t2.path, t2 FROM t AS t1 JOIN t AS t2 ON
16 | {3,7,11,16} | (16,"{3,7,11,16}")
(16 rows)
+CREATE TEMP TABLE duplicates (a INT NOT NULL);
+INSERT INTO duplicates VALUES(1), (1);
+-- Try out a recursive UNION case where the non-recursive part's table slot
+-- uses TTSOpsBufferHeapTuple and contains duplicate rows.
+WITH RECURSIVE cte (a) as (
+ SELECT a FROM duplicates
+ UNION
+ SELECT a FROM cte
+)
+SELECT a FROM cte;
+ a
+---
+ 1
+(1 row)
+
-- SEARCH clause
create table graph0( f int, t int, label text );
insert into graph0 values
index 1c8545b5b0dd067b6e3b82d1f4226de98d51c97c..5252f872ec4a6626a39626d33efbe5c55fba0742 100644 (file)
SELECT t1.id, t2.path, t2 FROM t AS t1 JOIN t AS t2 ON
(t1.id=t2.id);
+CREATE TEMP TABLE duplicates (a INT NOT NULL);
+INSERT INTO duplicates VALUES(1), (1);
+
+-- Try out a recursive UNION case where the non-recursive part's table slot
+-- uses TTSOpsBufferHeapTuple and contains duplicate rows.
+WITH RECURSIVE cte (a) as (
+ SELECT a FROM duplicates
+ UNION
+ SELECT a FROM cte
+)
+SELECT a FROM cte;
+
-- SEARCH clause
create table graph0( f int, t int, label text );