join.out 2.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
QUERY: CREATE TABLE JOIN_TBL (
  i integer,
  j integer,
  x text
);
QUERY: CREATE TABLE JOIN2_TBL (
  i integer,
  k integer
);
QUERY: INSERT INTO JOIN_TBL VALUES (1, 3, 'one');
QUERY: INSERT INTO JOIN_TBL VALUES (2, 2, 'two');
QUERY: INSERT INTO JOIN_TBL VALUES (3, 1, 'three');
QUERY: INSERT INTO JOIN_TBL VALUES (4, 0, 'four');
QUERY: INSERT INTO JOIN2_TBL VALUES (1, -1);
QUERY: INSERT INTO JOIN2_TBL VALUES (2, 2);
QUERY: INSERT INTO JOIN2_TBL VALUES (3, -3);
QUERY: INSERT INTO JOIN2_TBL VALUES (2, 4);
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL CROSS JOIN JOIN2_TBL;
xxx|i|j|x    |i| k
---+-+-+-----+-+--
   |1|3|one  |1|-1
   |2|2|two  |1|-1
   |3|1|three|1|-1
   |4|0|four |1|-1
   |1|3|one  |2| 2
   |2|2|two  |2| 2
   |3|1|three|2| 2
   |4|0|four |2| 2
   |1|3|one  |3|-3
   |2|2|two  |3|-3
   |3|1|three|3|-3
   |4|0|four |3|-3
   |1|3|one  |2| 4
   |2|2|two  |2| 4
   |3|1|three|2| 4
   |4|0|four |2| 4
(16 rows)

QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL NATURAL JOIN JOIN2_TBL;
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL INNER JOIN JOIN2_TBL USING (i);
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i = JOIN2_TBL.i);
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i = JOIN2_TBL.k);
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL CROSS JOIN JOIN2_TBL;
xxx|i|j|x    |i| k
---+-+-+-----+-+--
   |1|3|one  |1|-1
   |2|2|two  |1|-1
   |3|1|three|1|-1
   |4|0|four |1|-1
   |1|3|one  |2| 2
   |2|2|two  |2| 2
   |3|1|three|2| 2
   |4|0|four |2| 2
   |1|3|one  |3|-3
   |2|2|two  |3|-3
   |3|1|three|3|-3
   |4|0|four |3|-3
   |1|3|one  |2| 4
   |2|2|two  |2| 4
   |3|1|three|2| 4
   |4|0|four |2| 4
(16 rows)

QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i <= JOIN2_TBL.k);
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL OUTER JOIN JOIN2_TBL USING (i);
NOTICE:  OUTER JOIN not yet implemented
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL LEFT OUTER JOIN JOIN2_TBL USING (i);
NOTICE:  LEFT OUTER JOIN not yet implemented
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL RIGHT OUTER JOIN JOIN2_TBL USING (i);
NOTICE:  RIGHT OUTER JOIN not yet implemented
ERROR:  JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
  FROM JOIN_TBL FULL OUTER JOIN JOIN2_TBL USING (i);
NOTICE:  FULL OUTER JOIN not yet implemented
ERROR:  JOIN expressions are not yet implemented
QUERY: DROP TABLE JOIN_TBL;
QUERY: DROP TABLE JOIN2_TBL;