In my very unsophisticated PostgreSQL v8.4.13 database with tables A
and B
, column A.a
, is a SERIAL PRIMARY KEY
that is FOREIGN KEY
ed to B.a
. There are other columns in both tables. a
is not UNIQUE
in B
.
In the confines of one transaction I would like to add one row to A
and a corresponding row to B
.
I'm scripting with the PHP PDO for PGL.
Is it possible to do such a thing in one round trip?
Is it possible to do similarly with multiple rows to B
in one round trip?