Hi,there is option no. 4 (kind of extended WITH)WITH inserted_row AS ( INSERT INTO "tblParent" ("RowValue") VALUES ('2012-01-01'::date) RETURNING *), updated_row AS (UPDATE "tblChild"SET "ParentRowId" = (SELECT "RowId" FROM inserted_row)WHERE "RowId" = 123 --whatever You need)SELECT "RowId" FROM inserted_row;I missed it in previous post.This could be part of function (SELECT statement should be modified) or ad-hoc query.Regards,Bartek
pgsql-novice by date:
Соглашаюсь с условиями обработки персональных данных