Make some adjustments to reduce platform dependencies in plan selection.

In particular, there was a mathematical tie between the two possible
nestloop-with-materialized-inner-scan plans for a join (ie, we computed
the same cost with either input on the inside), resulting in a roundoff
error driven choice, if the relations were both small enough to fit in
sort_mem.  Add a small cost factor to ensure we prefer materializing the
smaller input.  This changes several regression test plans, but with any
luck we will now have more stability across platforms.
This commit is contained in:
Tom Lane 2004-12-02 01:34:18 +00:00
parent ee9007a2e1
commit 4e91824b94
9 changed files with 1481 additions and 1465 deletions

View File

@ -49,7 +49,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.135 2004/10/23 00:05:27 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.136 2004/12/02 01:34:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -615,6 +615,15 @@ cost_material(Path *path,
run_cost += npages;
}
/*
* Charge a very small amount per inserted tuple, to reflect bookkeeping
* costs. We use cpu_tuple_cost/10 for this. This is needed to break
* the tie that would otherwise exist between nestloop with A outer,
* materialized B inner and nestloop with B outer, materialized A inner.
* The extra cost ensures we'll prefer materializing the smaller rel.
*/
startup_cost += cpu_tuple_cost * 0.1 * tuples;
/*
* Also charge a small amount per extracted tuple. We use
* cpu_tuple_cost so that it doesn't appear worthwhile to materialize

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.98 2004/12/01 19:00:43 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.99 2004/12/02 01:34:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -268,6 +268,12 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
* but is probably an overestimate for indexes. Fortunately
* get_relation_info() can clamp the overestimate to the
* parent table's size.
*
* Note: this code intentionally disregards alignment
* considerations, because (a) that would be gilding the
* lily considering how crude the estimate is, and (b)
* it creates platform dependencies in the default plans
* which are kind of a headache for regression testing.
*/
int32 tuple_width = 0;
int i;
@ -291,8 +297,7 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
attr_widths[i] = item_width;
tuple_width += item_width;
}
tuple_width = MAXALIGN(tuple_width);
tuple_width += MAXALIGN(sizeof(HeapTupleHeaderData));
tuple_width += sizeof(HeapTupleHeaderData);
tuple_width += sizeof(ItemPointerData);
/* note: integer division is intentional here */
density = (BLCKSZ - sizeof(PageHeaderData)) / tuple_width;

View File

@ -112,34 +112,34 @@ SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest
thirty | f1 | s | closest
--------+------------+-------------------------------+----------------------------------
| (0,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (0,0) | [(0,0),(6,6)] | (-0,0)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (0,0) | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (0,0) | [(-1000000,200),(300000,-40)] | (0.00284023658959,15.3846148603)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (0,0) | [(11,22),(33,44)] | (11,22)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-10,0) | [(11,22),(33,44)] | (11,22)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (-3,4) | [(11,22),(33,44)] | (11,22)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (-5,-12) | [(11,22),(33,44)] | (11,22)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (10,10) | [(11,22),(33,44)] | (11,22)
(30 rows)
@ -166,28 +166,28 @@ SELECT '' AS twentyfour, b.f1 + p.f1 AS translation
twentyfour | translation
------------+-------------------------
| (2,2),(0,0)
| (-8,2),(-10,0)
| (-1,6),(-3,4)
| (7.1,36.5),(5.1,34.5)
| (-3,-10),(-5,-12)
| (12,12),(10,10)
| (3,3),(1,1)
| (-7,3),(-9,1)
| (0,7),(-2,5)
| (8.1,37.5),(6.1,35.5)
| (-2,-9),(-4,-11)
| (13,13),(11,11)
| (2.5,3.5),(2.5,2.5)
| (-7.5,3.5),(-7.5,2.5)
| (-0.5,7.5),(-0.5,6.5)
| (7.6,38),(7.6,37)
| (-2.5,-8.5),(-2.5,-9.5)
| (12.5,13.5),(12.5,12.5)
| (3,3),(3,3)
| (-8,2),(-10,0)
| (-7,3),(-9,1)
| (-7.5,3.5),(-7.5,2.5)
| (-7,3),(-7,3)
| (-1,6),(-3,4)
| (0,7),(-2,5)
| (-0.5,7.5),(-0.5,6.5)
| (0,7),(0,7)
| (7.1,36.5),(5.1,34.5)
| (8.1,37.5),(6.1,35.5)
| (7.6,38),(7.6,37)
| (8.1,37.5),(8.1,37.5)
| (-3,-10),(-5,-12)
| (-2,-9),(-4,-11)
| (-2.5,-8.5),(-2.5,-9.5)
| (-2,-9),(-2,-9)
| (12,12),(10,10)
| (13,13),(11,11)
| (12.5,13.5),(12.5,12.5)
| (13,13),(13,13)
(24 rows)
@ -196,28 +196,28 @@ SELECT '' AS twentyfour, b.f1 - p.f1 AS translation
twentyfour | translation
------------+---------------------------
| (2,2),(0,0)
| (12,2),(10,0)
| (5,-2),(3,-4)
| (-3.1,-32.5),(-5.1,-34.5)
| (7,14),(5,12)
| (-8,-8),(-10,-10)
| (3,3),(1,1)
| (13,3),(11,1)
| (6,-1),(4,-3)
| (-2.1,-31.5),(-4.1,-33.5)
| (8,15),(6,13)
| (-7,-7),(-9,-9)
| (2.5,3.5),(2.5,2.5)
| (12.5,3.5),(12.5,2.5)
| (5.5,-0.5),(5.5,-1.5)
| (-2.6,-31),(-2.6,-32)
| (7.5,15.5),(7.5,14.5)
| (-7.5,-6.5),(-7.5,-7.5)
| (3,3),(3,3)
| (12,2),(10,0)
| (13,3),(11,1)
| (12.5,3.5),(12.5,2.5)
| (13,3),(13,3)
| (5,-2),(3,-4)
| (6,-1),(4,-3)
| (5.5,-0.5),(5.5,-1.5)
| (6,-1),(6,-1)
| (-3.1,-32.5),(-5.1,-34.5)
| (-2.1,-31.5),(-4.1,-33.5)
| (-2.6,-31),(-2.6,-32)
| (-2.1,-31.5),(-2.1,-31.5)
| (7,14),(5,12)
| (8,15),(6,13)
| (7.5,15.5),(7.5,14.5)
| (8,15),(8,15)
| (-8,-8),(-10,-10)
| (-7,-7),(-9,-9)
| (-7.5,-6.5),(-7.5,-7.5)
| (-7,-7),(-7,-7)
(24 rows)
@ -226,29 +226,29 @@ SELECT '' AS twentyfour, b.f1 * p.f1 AS rotation
FROM BOX_TBL b, POINT_TBL p;
twentyfour | rotation
------------+-----------------------------
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (-0,0),(-20,-20)
| (-0,2),(-14,0)
| (0,79.2),(-58.8,0)
| (14,-0),(0,-34)
| (0,40),(0,0)
| (0,0),(0,0)
| (-10,-10),(-30,-30)
| (-7,3),(-21,1)
| (-29.4,118.8),(-88.2,39.6)
| (21,-17),(7,-51)
| (0,60),(0,20)
| (0,0),(0,0)
| (-25,-25),(-25,-35)
| (-17.5,2.5),(-21.5,-0.5)
| (-73.5,104.1),(-108,99)
| (29.5,-42.5),(17.5,-47.5)
| (0,60),(-10,50)
| (0,0),(0,0)
| (-30,-30),(-30,-30)
| (-0,2),(-14,0)
| (-7,3),(-21,1)
| (-17.5,2.5),(-21.5,-0.5)
| (-21,3),(-21,3)
| (0,79.2),(-58.8,0)
| (-29.4,118.8),(-88.2,39.6)
| (-73.5,104.1),(-108,99)
| (-88.2,118.8),(-88.2,118.8)
| (14,-0),(0,-34)
| (21,-17),(7,-51)
| (29.5,-42.5),(17.5,-47.5)
| (21,-51),(21,-51)
| (0,40),(0,0)
| (0,60),(0,20)
| (0,60),(-10,50)
| (0,60),(0,60)
(24 rows)
@ -258,24 +258,24 @@ SELECT '' AS twenty, b.f1 / p.f1 AS rotation
twenty | rotation
--------+----------------------------------------------------------------------
| (0,-0),(-0.2,-0.2)
| (-0.1,-0.1),(-0.3,-0.3)
| (-0.25,-0.25),(-0.25,-0.35)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.08,-0),(0,-0.56)
| (0.12,-0.28),(0.04,-0.84)
| (0.26,-0.7),(0.1,-0.82)
| (0.12,-0.84),(0.12,-0.84)
| (0.0651176557644,0),(0,-0.0483449262493)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (-0,0.0828402366864),(-0.201183431953,0)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.2,0),(0,0)
| (-0.1,-0.1),(-0.3,-0.3)
| (0.12,-0.28),(0.04,-0.84)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (0.3,0),(0.1,0)
| (-0.25,-0.25),(-0.25,-0.35)
| (0.26,-0.7),(0.1,-0.82)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (0.3,0.05),(0.25,0)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.12,-0.84),(0.12,-0.84)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.3,0),(0.3,0)
(20 rows)
@ -345,28 +345,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 ~ p.f1 AS contains
twentyfour | f1 | f1 | contains
------------+------------+---------------------+----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)
@ -375,28 +375,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 @ poly.f1 AS contained
twentyfour | f1 | f1 | contained
------------+------------+---------------------+-----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)

View File

@ -112,34 +112,34 @@ SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest
thirty | f1 | s | closest
--------+------------+-------------------------------+----------------------------------
| (0,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (0,0) | [(0,0),(6,6)] | (0,0)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (0,0) | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (0,0) | [(-1000000,200),(300000,-40)] | (0.00284023658959,15.3846148603)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (0,0) | [(11,22),(33,44)] | (11,22)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-10,0) | [(11,22),(33,44)] | (11,22)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (-3,4) | [(11,22),(33,44)] | (11,22)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (-5,-12) | [(11,22),(33,44)] | (11,22)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (10,10) | [(11,22),(33,44)] | (11,22)
(30 rows)
@ -166,28 +166,28 @@ SELECT '' AS twentyfour, b.f1 + p.f1 AS translation
twentyfour | translation
------------+-------------------------
| (2,2),(0,0)
| (-8,2),(-10,0)
| (-1,6),(-3,4)
| (7.1,36.5),(5.1,34.5)
| (-3,-10),(-5,-12)
| (12,12),(10,10)
| (3,3),(1,1)
| (-7,3),(-9,1)
| (0,7),(-2,5)
| (8.1,37.5),(6.1,35.5)
| (-2,-9),(-4,-11)
| (13,13),(11,11)
| (2.5,3.5),(2.5,2.5)
| (-7.5,3.5),(-7.5,2.5)
| (-0.5,7.5),(-0.5,6.5)
| (7.6,38),(7.6,37)
| (-2.5,-8.5),(-2.5,-9.5)
| (12.5,13.5),(12.5,12.5)
| (3,3),(3,3)
| (-8,2),(-10,0)
| (-7,3),(-9,1)
| (-7.5,3.5),(-7.5,2.5)
| (-7,3),(-7,3)
| (-1,6),(-3,4)
| (0,7),(-2,5)
| (-0.5,7.5),(-0.5,6.5)
| (0,7),(0,7)
| (7.1,36.5),(5.1,34.5)
| (8.1,37.5),(6.1,35.5)
| (7.6,38),(7.6,37)
| (8.1,37.5),(8.1,37.5)
| (-3,-10),(-5,-12)
| (-2,-9),(-4,-11)
| (-2.5,-8.5),(-2.5,-9.5)
| (-2,-9),(-2,-9)
| (12,12),(10,10)
| (13,13),(11,11)
| (12.5,13.5),(12.5,12.5)
| (13,13),(13,13)
(24 rows)
@ -196,28 +196,28 @@ SELECT '' AS twentyfour, b.f1 - p.f1 AS translation
twentyfour | translation
------------+---------------------------
| (2,2),(0,0)
| (12,2),(10,0)
| (5,-2),(3,-4)
| (-3.1,-32.5),(-5.1,-34.5)
| (7,14),(5,12)
| (-8,-8),(-10,-10)
| (3,3),(1,1)
| (13,3),(11,1)
| (6,-1),(4,-3)
| (-2.1,-31.5),(-4.1,-33.5)
| (8,15),(6,13)
| (-7,-7),(-9,-9)
| (2.5,3.5),(2.5,2.5)
| (12.5,3.5),(12.5,2.5)
| (5.5,-0.5),(5.5,-1.5)
| (-2.6,-31),(-2.6,-32)
| (7.5,15.5),(7.5,14.5)
| (-7.5,-6.5),(-7.5,-7.5)
| (3,3),(3,3)
| (12,2),(10,0)
| (13,3),(11,1)
| (12.5,3.5),(12.5,2.5)
| (13,3),(13,3)
| (5,-2),(3,-4)
| (6,-1),(4,-3)
| (5.5,-0.5),(5.5,-1.5)
| (6,-1),(6,-1)
| (-3.1,-32.5),(-5.1,-34.5)
| (-2.1,-31.5),(-4.1,-33.5)
| (-2.6,-31),(-2.6,-32)
| (-2.1,-31.5),(-2.1,-31.5)
| (7,14),(5,12)
| (8,15),(6,13)
| (7.5,15.5),(7.5,14.5)
| (8,15),(8,15)
| (-8,-8),(-10,-10)
| (-7,-7),(-9,-9)
| (-7.5,-6.5),(-7.5,-7.5)
| (-7,-7),(-7,-7)
(24 rows)
@ -226,29 +226,29 @@ SELECT '' AS twentyfour, b.f1 * p.f1 AS rotation
FROM BOX_TBL b, POINT_TBL p;
twentyfour | rotation
------------+-----------------------------
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(-20,-20)
| (0,2),(-14,0)
| (0,79.2),(-58.8,0)
| (14,0),(0,-34)
| (0,40),(0,0)
| (0,0),(0,0)
| (-10,-10),(-30,-30)
| (-7,3),(-21,1)
| (-29.4,118.8),(-88.2,39.6)
| (21,-17),(7,-51)
| (0,60),(0,20)
| (0,0),(0,0)
| (-25,-25),(-25,-35)
| (-17.5,2.5),(-21.5,-0.5)
| (-73.5,104.1),(-108,99)
| (29.5,-42.5),(17.5,-47.5)
| (0,60),(-10,50)
| (0,0),(0,0)
| (-30,-30),(-30,-30)
| (0,2),(-14,0)
| (-7,3),(-21,1)
| (-17.5,2.5),(-21.5,-0.5)
| (-21,3),(-21,3)
| (0,79.2),(-58.8,0)
| (-29.4,118.8),(-88.2,39.6)
| (-73.5,104.1),(-108,99)
| (-88.2,118.8),(-88.2,118.8)
| (14,0),(0,-34)
| (21,-17),(7,-51)
| (29.5,-42.5),(17.5,-47.5)
| (21,-51),(21,-51)
| (0,40),(0,0)
| (0,60),(0,20)
| (0,60),(-10,50)
| (0,60),(0,60)
(24 rows)
@ -258,24 +258,24 @@ SELECT '' AS twenty, b.f1 / p.f1 AS rotation
twenty | rotation
--------+----------------------------------------------------------------------
| (0,0),(-0.2,-0.2)
| (-0.1,-0.1),(-0.3,-0.3)
| (-0.25,-0.25),(-0.25,-0.35)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.08,0),(0,-0.56)
| (0.12,-0.28),(0.04,-0.84)
| (0.26,-0.7),(0.1,-0.82)
| (0.12,-0.84),(0.12,-0.84)
| (0.0651176557644,0),(0,-0.0483449262493)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (0,0.0828402366864),(-0.201183431953,0)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.2,0),(0,0)
| (-0.1,-0.1),(-0.3,-0.3)
| (0.12,-0.28),(0.04,-0.84)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (0.3,0),(0.1,0)
| (-0.25,-0.25),(-0.25,-0.35)
| (0.26,-0.7),(0.1,-0.82)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (0.3,0.05),(0.25,0)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.12,-0.84),(0.12,-0.84)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.3,0),(0.3,0)
(20 rows)
@ -345,28 +345,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 ~ p.f1 AS contains
twentyfour | f1 | f1 | contains
------------+------------+---------------------+----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)
@ -375,28 +375,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 @ poly.f1 AS contained
twentyfour | f1 | f1 | contained
------------+------------+---------------------+-----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)

View File

@ -112,34 +112,34 @@ SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest
thirty | f1 | s | closest
--------+------------+-------------------------------+----------------------------------
| (0,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (0,0) | [(0,0),(6,6)] | (0,0)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (0,0) | [(10,-10),(-3,-4)] | (-2.0487804878,-4.43902439024)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (0,0) | [(-1000000,200),(300000,-40)] | (0.00284023658959,15.3846148603)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (0,0) | [(11,22),(33,44)] | (11,22)
| (-10,0) | [(1,2),(3,4)] | (1,2)
| (-10,0) | [(0,0),(6,6)] | (0,0)
| (-10,0) | [(10,-10),(-3,-4)] | (-3,-4)
| (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258,15.386461014)
| (-10,0) | [(11,22),(33,44)] | (11,22)
| (-3,4) | [(1,2),(3,4)] | (1,2)
| (-3,4) | [(0,0),(6,6)] | (0.5,0.5)
| (-3,4) | [(10,-10),(-3,-4)] | (-3,-4)
| (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812268,15.3851688427)
| (-3,4) | [(11,22),(33,44)] | (11,22)
| (5.1,34.5) | [(1,2),(3,4)] | (3,4)
| (5.1,34.5) | [(0,0),(6,6)] | (6,6)
| (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4)
| (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221,15.3836744977)
| (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3)
| (-5,-12) | [(1,2),(3,4)] | (1,2)
| (-5,-12) | [(0,0),(6,6)] | (0,0)
| (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878,-4.64390243902)
| (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420846,15.3855375282)
| (-5,-12) | [(11,22),(33,44)] | (11,22)
| (10,10) | [(1,2),(3,4)] | (3,4)
| (10,10) | [(0,0),(6,6)] | (6,6)
| (10,10) | [(10,-10),(-3,-4)] | (2.39024390244,-6.48780487805)
| (10,10) | [(-1000000,200),(300000,-40)] | (10.000993742,15.3827690473)
| (10,10) | [(11,22),(33,44)] | (11,22)
(30 rows)
@ -166,28 +166,28 @@ SELECT '' AS twentyfour, b.f1 + p.f1 AS translation
twentyfour | translation
------------+-------------------------
| (2,2),(0,0)
| (-8,2),(-10,0)
| (-1,6),(-3,4)
| (7.1,36.5),(5.1,34.5)
| (-3,-10),(-5,-12)
| (12,12),(10,10)
| (3,3),(1,1)
| (-7,3),(-9,1)
| (0,7),(-2,5)
| (8.1,37.5),(6.1,35.5)
| (-2,-9),(-4,-11)
| (13,13),(11,11)
| (2.5,3.5),(2.5,2.5)
| (-7.5,3.5),(-7.5,2.5)
| (-0.5,7.5),(-0.5,6.5)
| (7.6,38),(7.6,37)
| (-2.5,-8.5),(-2.5,-9.5)
| (12.5,13.5),(12.5,12.5)
| (3,3),(3,3)
| (-8,2),(-10,0)
| (-7,3),(-9,1)
| (-7.5,3.5),(-7.5,2.5)
| (-7,3),(-7,3)
| (-1,6),(-3,4)
| (0,7),(-2,5)
| (-0.5,7.5),(-0.5,6.5)
| (0,7),(0,7)
| (7.1,36.5),(5.1,34.5)
| (8.1,37.5),(6.1,35.5)
| (7.6,38),(7.6,37)
| (8.1,37.5),(8.1,37.5)
| (-3,-10),(-5,-12)
| (-2,-9),(-4,-11)
| (-2.5,-8.5),(-2.5,-9.5)
| (-2,-9),(-2,-9)
| (12,12),(10,10)
| (13,13),(11,11)
| (12.5,13.5),(12.5,12.5)
| (13,13),(13,13)
(24 rows)
@ -196,28 +196,28 @@ SELECT '' AS twentyfour, b.f1 - p.f1 AS translation
twentyfour | translation
------------+---------------------------
| (2,2),(0,0)
| (12,2),(10,0)
| (5,-2),(3,-4)
| (-3.1,-32.5),(-5.1,-34.5)
| (7,14),(5,12)
| (-8,-8),(-10,-10)
| (3,3),(1,1)
| (13,3),(11,1)
| (6,-1),(4,-3)
| (-2.1,-31.5),(-4.1,-33.5)
| (8,15),(6,13)
| (-7,-7),(-9,-9)
| (2.5,3.5),(2.5,2.5)
| (12.5,3.5),(12.5,2.5)
| (5.5,-0.5),(5.5,-1.5)
| (-2.6,-31),(-2.6,-32)
| (7.5,15.5),(7.5,14.5)
| (-7.5,-6.5),(-7.5,-7.5)
| (3,3),(3,3)
| (12,2),(10,0)
| (13,3),(11,1)
| (12.5,3.5),(12.5,2.5)
| (13,3),(13,3)
| (5,-2),(3,-4)
| (6,-1),(4,-3)
| (5.5,-0.5),(5.5,-1.5)
| (6,-1),(6,-1)
| (-3.1,-32.5),(-5.1,-34.5)
| (-2.1,-31.5),(-4.1,-33.5)
| (-2.6,-31),(-2.6,-32)
| (-2.1,-31.5),(-2.1,-31.5)
| (7,14),(5,12)
| (8,15),(6,13)
| (7.5,15.5),(7.5,14.5)
| (8,15),(8,15)
| (-8,-8),(-10,-10)
| (-7,-7),(-9,-9)
| (-7.5,-6.5),(-7.5,-7.5)
| (-7,-7),(-7,-7)
(24 rows)
@ -226,29 +226,29 @@ SELECT '' AS twentyfour, b.f1 * p.f1 AS rotation
FROM BOX_TBL b, POINT_TBL p;
twentyfour | rotation
------------+-----------------------------
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (0,0),(0,0)
| (-0,0),(-20,-20)
| (-0,2),(-14,0)
| (0,79.2),(-58.8,0)
| (14,-0),(0,-34)
| (0,40),(0,0)
| (0,0),(0,0)
| (-10,-10),(-30,-30)
| (-7,3),(-21,1)
| (-29.4,118.8),(-88.2,39.6)
| (21,-17),(7,-51)
| (0,60),(0,20)
| (0,0),(0,0)
| (-25,-25),(-25,-35)
| (-17.5,2.5),(-21.5,-0.5)
| (-73.5,104.1),(-108,99)
| (29.5,-42.5),(17.5,-47.5)
| (0,60),(-10,50)
| (0,0),(0,0)
| (-30,-30),(-30,-30)
| (-0,2),(-14,0)
| (-7,3),(-21,1)
| (-17.5,2.5),(-21.5,-0.5)
| (-21,3),(-21,3)
| (0,79.2),(-58.8,0)
| (-29.4,118.8),(-88.2,39.6)
| (-73.5,104.1),(-108,99)
| (-88.2,118.8),(-88.2,118.8)
| (14,-0),(0,-34)
| (21,-17),(7,-51)
| (29.5,-42.5),(17.5,-47.5)
| (21,-51),(21,-51)
| (0,40),(0,0)
| (0,60),(0,20)
| (0,60),(-10,50)
| (0,60),(0,60)
(24 rows)
@ -258,24 +258,24 @@ SELECT '' AS twenty, b.f1 / p.f1 AS rotation
twenty | rotation
--------+----------------------------------------------------------------------
| (0,-0),(-0.2,-0.2)
| (-0.1,-0.1),(-0.3,-0.3)
| (-0.25,-0.25),(-0.25,-0.35)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.08,-0),(0,-0.56)
| (0.12,-0.28),(0.04,-0.84)
| (0.26,-0.7),(0.1,-0.82)
| (0.12,-0.84),(0.12,-0.84)
| (0.0651176557644,0),(0,-0.0483449262493)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (-0,0.0828402366864),(-0.201183431953,0)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.2,0),(0,0)
| (-0.1,-0.1),(-0.3,-0.3)
| (0.12,-0.28),(0.04,-0.84)
| (0.0976764836466,-0.0241724631247),(0.0325588278822,-0.072517389374)
| (-0.100591715976,0.12426035503),(-0.301775147929,0.0414201183432)
| (0.3,0),(0.1,0)
| (-0.25,-0.25),(-0.25,-0.35)
| (0.26,-0.7),(0.1,-0.82)
| (0.109762715209,-0.0562379754329),(0.0813970697055,-0.0604311578117)
| (-0.251479289941,0.103550295858),(-0.322485207101,0.0739644970414)
| (0.3,0.05),(0.25,0)
| (-0.3,-0.3),(-0.3,-0.3)
| (0.12,-0.84),(0.12,-0.84)
| (0.0976764836466,-0.072517389374),(0.0976764836466,-0.072517389374)
| (-0.301775147929,0.12426035503),(-0.301775147929,0.12426035503)
| (0.3,0),(0.3,0)
(20 rows)
@ -345,28 +345,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 ~ p.f1 AS contains
twentyfour | f1 | f1 | contains
------------+------------+---------------------+----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)
@ -375,28 +375,28 @@ SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 @ poly.f1 AS contained
twentyfour | f1 | f1 | contained
------------+------------+---------------------+-----------
| (0,0) | ((2,0),(2,4),(0,0)) | t
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (0,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (0,0) | ((0,0)) | t
| (-10,0) | ((0,0)) | f
| (-3,4) | ((0,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (-5,-12) | ((0,0)) | f
| (10,10) | ((0,0)) | f
| (0,0) | ((0,1),(0,1)) | f
| (-10,0) | ((2,0),(2,4),(0,0)) | f
| (-10,0) | ((3,1),(3,3),(1,0)) | f
| (-10,0) | ((0,0)) | f
| (-10,0) | ((0,1),(0,1)) | f
| (-3,4) | ((2,0),(2,4),(0,0)) | f
| (-3,4) | ((3,1),(3,3),(1,0)) | f
| (-3,4) | ((0,0)) | f
| (-3,4) | ((0,1),(0,1)) | f
| (5.1,34.5) | ((2,0),(2,4),(0,0)) | f
| (5.1,34.5) | ((3,1),(3,3),(1,0)) | f
| (5.1,34.5) | ((0,0)) | f
| (5.1,34.5) | ((0,1),(0,1)) | f
| (-5,-12) | ((2,0),(2,4),(0,0)) | f
| (-5,-12) | ((3,1),(3,3),(1,0)) | f
| (-5,-12) | ((0,0)) | f
| (-5,-12) | ((0,1),(0,1)) | f
| (10,10) | ((2,0),(2,4),(0,0)) | f
| (10,10) | ((3,1),(3,3),(1,0)) | f
| (10,10) | ((0,0)) | f
| (10,10) | ((0,1),(0,1)) | f
(24 rows)

View File

@ -557,17 +557,18 @@ insert into bar2 values(2,2,2);
insert into bar2 values(3,3,3);
insert into bar2 values(4,4,4);
update bar set f2 = f2 + 100 where f1 in (select f1 from foo);
SELECT relname, bar.* FROM bar, pg_class where bar.tableoid = pg_class.oid;
SELECT relname, bar.* FROM bar, pg_class where bar.tableoid = pg_class.oid
order by 1,2;
relname | f1 | f2
---------+----+-----
bar | 4 | 4
bar | 3 | 103
bar | 2 | 102
bar | 1 | 101
bar2 | 4 | 4
bar2 | 3 | 103
bar2 | 2 | 102
bar | 2 | 102
bar | 3 | 103
bar | 4 | 4
bar2 | 1 | 101
bar2 | 2 | 102
bar2 | 3 | 103
bar2 | 4 | 4
(8 rows)
/* Test inheritance of structure (LIKE) */

File diff suppressed because it is too large Load Diff

View File

@ -118,7 +118,8 @@ insert into bar2 values(4,4,4);
update bar set f2 = f2 + 100 where f1 in (select f1 from foo);
SELECT relname, bar.* FROM bar, pg_class where bar.tableoid = pg_class.oid;
SELECT relname, bar.* FROM bar, pg_class where bar.tableoid = pg_class.oid
order by 1,2;
/* Test inheritance of structure (LIKE) */

View File

@ -167,11 +167,11 @@ SELECT '' AS "xxx", *
SELECT '' AS "xxx", *
FROM J1_TBL LEFT OUTER JOIN J2_TBL USING (i)
ORDER BY i;
ORDER BY i, k;
SELECT '' AS "xxx", *
FROM J1_TBL LEFT JOIN J2_TBL USING (i)
ORDER BY i;
ORDER BY i, k;
SELECT '' AS "xxx", *
FROM J1_TBL RIGHT OUTER JOIN J2_TBL USING (i);
@ -181,11 +181,11 @@ SELECT '' AS "xxx", *
SELECT '' AS "xxx", *
FROM J1_TBL FULL OUTER JOIN J2_TBL USING (i)
ORDER BY i, t;
ORDER BY i, k;
SELECT '' AS "xxx", *
FROM J1_TBL FULL JOIN J2_TBL USING (i)
ORDER BY i, t;
ORDER BY i, k;
SELECT '' AS "xxx", *
FROM J1_TBL LEFT JOIN J2_TBL USING (i) WHERE (k = 1);