1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Repair list-vs-node confusion that resulted in failure for INNER JOIN ON.

Make it behave correctly when there are more than two tables being
joined, also.  Update regression test expected outputs.
This commit is contained in:
Tom Lane
2000-05-12 01:33:56 +00:00
parent 4624b84cf2
commit 01911c98db
3 changed files with 75 additions and 58 deletions

View File

@ -274,10 +274,22 @@ SELECT '' AS "xxx", *
--
SELECT '' AS "xxx", *
FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.i);
ERROR: transformExpr: does not know how to transform node 501 (internal error)
xxx | i | j | t | i | k
-----+---+---+-------+---+----
| 1 | 3 | one | 1 | -1
| 2 | 2 | two | 2 | 2
| 2 | 2 | two | 2 | 4
| 3 | 1 | three | 3 | -3
(4 rows)
SELECT '' AS "xxx", *
FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i = J2_TBL.k);
ERROR: transformExpr: does not know how to transform node 501 (internal error)
xxx | i | j | t | i | k
-----+---+---+------+---+---
| 2 | 2 | two | 2 | 2
| 4 | 0 | four | 2 | 4
(2 rows)
SELECT '' AS "xxx", *
FROM J1_TBL CROSS JOIN J2_TBL;
xxx | i | j | t | i | k
@ -305,7 +317,16 @@ SELECT '' AS "xxx", *
--
SELECT '' AS "xxx", *
FROM J1_TBL JOIN J2_TBL ON (J1_TBL.i <= J2_TBL.k);
ERROR: transformExpr: does not know how to transform node 501 (internal error)
xxx | i | j | t | i | k
-----+---+---+-------+---+---
| 1 | 3 | one | 2 | 2
| 2 | 2 | two | 2 | 2
| 1 | 3 | one | 2 | 4
| 2 | 2 | two | 2 | 4
| 3 | 1 | three | 2 | 4
| 4 | 0 | four | 2 | 4
(6 rows)
--
-- Outer joins
--