I've searched around for an answer and it seems definitive but I figured I would double check with the Stack Overflow community:
Here's what I'm trying to do:
INSERT INTO my_table VALUES (a, b, c)
RETURNING (SELECT x, y, z FROM x_table, y_table, z_table
WHERE xid = a AND yid = b AND zid = c)
I get an error telling me I can't return more than one column.
It works if I tell it SELECT x FROM x_table WHERE xid = a
.
Is this at all possible in a single query as opposed to creating a seperate SELECT
query?
I'm using PostgreSQL 8.3.