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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andrew Hardy <andrew(dot)hardy(at)sabstt(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION
Date: 2022-02-09 19:26:34
Message-ID: CAKFQuwYnt=LCGq1TzzcKWgX0UpuL4BfKCNku2DeOfsSx9ZjWsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 9, 2022 at 11:12 AM Andrew Hardy <andrew(dot)hardy(at)sabstt(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Hardy 2022-02-09 20:01:59 Re: DELETING then INSERTING record with same PK in the same TRANSACTION
Previous Message Adrian Klaver 2022-02-09 18:37:42 Re: DELETING then INSERTING record with same PK in the same TRANSACTION