Re: with and trigger - Mailing list pgsql-general

From PegoraroF10
Subject Re: with and trigger
Date
Msg-id 1559135423282-0.post@n3.nabble.com
Whole thread Raw
In response to Re: with and trigger  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-general
Well, I think is not a transaction problem, because if you do the same thing
on a DO it will work. 
DO $$
  declare vMaster_ID integer;
begin
  insert into Master(Customer_ID, Field2) values(1, 'BlaBla') returning
Master_ID into vMaster_ID;
  insert into Detail(Master_ID, Product_ID, ProductValue) values(vMaster_ID,
5, 50);
end $$

As you can see, works exactly the same way and Detail trigger works as
expected, why ?



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html



pgsql-general by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: with and trigger
Next
From: Tom Lane
Date:
Subject: Re: with and trigger