Re: DELETING then INSERTING record with same PK in the same TRANSACTION - Mailing list pgsql-general

From Andrew Hardy
Subject Re: DELETING then INSERTING record with same PK in the same TRANSACTION
Date
Msg-id CAKxhU8ja0_wzsfK2er1w-moL3n0P=4ETNP4VbuFgjUknyFoROQ@mail.gmail.com
Whole thread Raw
In response to Re: DELETING then INSERTING record with same PK in the same TRANSACTION  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: DELETING then INSERTING record with same PK in the same TRANSACTION  (Andrew Hardy <andrew.hardy@sabstt.com>)
List pgsql-general
Really appreciate the input thank you.

I shall try to provide a full script, I guess if the cascades are relevant in going to have to also provide all of the indirect table creations and all of the earlier inserts to those various tables.

At the very least I'll try to provide a fuller error message and a minimum structure that will cause it to occur.

Andrew
 

On Wed, 9 Feb 2022, 19:26 David G. Johnston, <david.g.johnston@gmail.com> wrote:
On Wed, Feb 9, 2022 at 11:12 AM Andrew Hardy <andrew.hardy@sabstt.com> wrote:
Do I need some particular kind of settings on my transaction to be able to delete and insert afresh in the same transaction?

No.  I cannot reproduce your claim with a trivial example on stock 13.5.

You will need to be less vague and at least provide an exact reproducer script.

In case it is relevant - the first delete will lead to cascaded deletes on children.

This may indeed be relevant.  Again, you need to provide an exact reproducer, not expect others to reverse-engineer one for you.

David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION
Next
From: Adrian Klaver
Date:
Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION