From: Bryn Llewellyn <bryn@yugabyte.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Brent Wood <Brent.Wood@niwa.co.nz>
To: Andrew Hardy <andrew.hardy@sabstt.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION
Date: Wed, 9 Feb 2022 13:20:49 -0800
Message-ID: <2001A55F-C2D4-4B82-A680-632ABC550019@yugabyte.com> (raw)
In-Reply-To: <CAKFQuwYke8ndVd1xS0gHnYJngCY-REx6aL-0HYiVux2+UHYQtQ@mail.gmail.com>
References: <CAKxhU8isUe6NUs7i7dJzdVeHHoK417Sv=z7jUoHZMHbezG_VkA@mail.gmail.com>
<SY4PR01MB7076851903BD922E73E4988AA12E9@SY4PR01MB7076.ausprd01.prod.outlook.com>
<CAKFQuwYke8ndVd1xS0gHnYJngCY-REx6aL-0HYiVux2+UHYQtQ@mail.gmail.com>
> david.g.johnston@gmail.com wrote:
>
> The convention on these lists is to inline or bottom post (and to trim the reply to just the pertinent parts).
Just for completeness, I expected this test to run without error. (I tried it in PG Version 14.1).
create table t(k int primary key, v text not null);
insert into t(k, v) values (1, 'one'), (2, 'two');
select k, v from t order by k;
start transaction;
delete from t where k = 1;
insert into t(k, v) values(1, 'new one');
commit;
select k, v from t order by k;
Indeed it did run without error. And I saw the results that I expected.=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bryn@yugabyte.com, david.g.johnston@gmail.com, Brent.Wood@niwa.co.nz, andrew.hardy@sabstt.com
Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION
In-Reply-To: <2001A55F-C2D4-4B82-A680-632ABC550019@yugabyte.com>
References: <CAKxhU8isUe6NUs7i7dJzdVeHHoK417Sv=z7jUoHZMHbezG_VkA@mail.gmail.com> <SY4PR01MB7076851903BD922E73E4988AA12E9@SY4PR01MB7076.ausprd01.prod.outlook.com> <CAKFQuwYke8ndVd1xS0gHnYJngCY-REx6aL-0HYiVux2+UHYQtQ@mail.gmail.com> <2001A55F-C2D4-4B82-A680-632ABC550019@yugabyte.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox