Re: DELETING then INSERTING record with same PK in the same TRANSACTION

2022-02-10 Thread Andrew Hardy
a2', 'TEST0001'); INSERT INTO public.hotel_bookingx (itinerary, "hotelName") VALUES('TEST0001', 'Crown2'); COMMIT TRANSACTION; On Wed, 9 Feb 2022 at 20:01, Andrew Hardy wrote: > Really appreciate the input thank you. > > I shall try to pro

Re: DELETING then INSERTING record with same PK in the same TRANSACTION

2022-02-09 Thread Andrew Hardy
error message and a minimum structure that will cause it to occur. Andrew On Wed, 9 Feb 2022, 19:26 David G. Johnston, wrote: > On Wed, Feb 9, 2022 at 11:12 AM Andrew Hardy > wrote: > >> Do I need some particular kind of settings on my transaction to be able >> to delete and

DELETING then INSERTING record with same PK in the same TRANSACTION

2022-02-09 Thread Andrew Hardy
Hi, When I: Begin a transaction DELETE from where id (PK) = INSERT INTO VALUES () ... ... ... COMMIT I get insert into "itinerary" ("dk", "locator") values ($1, $2) - duplicate key value violates unique constraint "itinerary_pkey" Do I need some particular kind of settings on my transaction