blob: bbde851b43023c4de0e494ce40b3842e75879d17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* postgres can not */
/* syntax version 1 */
USE plato;
$a = SELECT AsTuple(1, 2) AS k1, 1 AS k2, 2 AS v;
$b = SELECT AsTuple(1, 2) AS k1, 1 AS k2, 3 AS v1
UNION ALL
SELECT AsTuple(1, 2) AS k1, 1 AS k2, 3 AS v1;
INSERT INTO @a
SELECT * FROM $a;
INSERT INTO @b
SELECT * FROM $b;
COMMIT;
SELECT * FROM @a AS a LEFT JOIN ANY @b AS b using(k1,k2);
SELECT * FROM @a AS a LEFT JOIN @b AS b using(k1,k2);
|