Tengo la siguiente transacción en la cual necesito utilizar el valor del "*returning id_roles*" fuera de la transacción. todo funciona bien pero no me sale ese dato por ningún lado
begin transaction; with roles as( insert INTO ovinos.roles VALUES(default,'prueba rol','el primer rol de prueba',2) returning id_rol ) insert INTO ovinos.funciones_roles VALUES(4,(select roles.id_rol from roles)), (5,(select roles.id_rol from roles))*returning id_roles;* commit; ROLLBACK TRANSACTION; ----------------------- MVJR