What will happen if multiple user run the following query at the same time?
INSERT INTO "Retail"."Attributes"("AttributeId","AttributeCode","AttributeName")
VALUES(nextval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass),'COL','Color');
INSERT INTO "Retail"."AttributeDetails"
("AttributeId","AttributeDetailCode","AttributeDetailName")
VALUES
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Red', 'Color Red'
),
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Blu', 'Color Blue'
),
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Gre', 'Color Green'
);
Is this as method as reliable as SCOPE_IDENTITY() of SQL SERVER? Any suggestion will be highly appreciated.