Tried this simple test without success. psql says (\h SELECT) that it
should work. Do I have the syntax wrong?
CREATE TABLE a(
x INTEGER PRIMARY KEY
, y INTEGER
);
CREATE TABLE a1(
x INTEGER REFERENCES a(x)
, z INTEGER
);
INSERT INTO a(x, y) VALUES (1, 1);
INSERT INTO a(x, y) VALUES (2, 2);
INSERT INTO a1(x, z) VALUES (2, 2);
SELECT a.x, a.y, a1.z
FROM USING( x )
WHERE a.x = a1.x
;
DROP TABLE a;
DROP TABLE a1;