Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHuOX-0003jH-S2 for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 21:20:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHuOW-0008T1-4c for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 21:20:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHuOV-0008Ss-PU for pgsql-general@lists.postgresql.org; Wed, 09 Feb 2022 21:20:55 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nHuOT-0003nu-E7 for pgsql-general@lists.postgresql.org; Wed, 09 Feb 2022 21:20:55 +0000 Received: by mail-pf1-x432.google.com with SMTP id u16so924176pfg.3 for ; Wed, 09 Feb 2022 13:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=PMA4kms5hN4qPofJbT6Nzb/Qdf/WB7SxQ7yn4NKM/ng=; b=ZL32htLfnbn67h44QFyfFm/YnT8cWfC9cQkIVAEehimeTR+22uzD8IR06yu5Uu8j/7 DFttgNIeMJxlrrm9M5C0PjUl6b3OOW1m9pXqUEqMRnPu8jjHEbwhShHUT2SbK7CcEBpF KOEYsZ8gmaRzlWJuvOOKXCNF9fzqMFmySHk/E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=PMA4kms5hN4qPofJbT6Nzb/Qdf/WB7SxQ7yn4NKM/ng=; b=rx58oAsoCCaiGi1aAI+hMlTVqcWTKMoOFCtmsJrMqKGinPLvWfaCQWRfPuDlS0Svpn EMgMW66YD1/lJLSlg+pHy3yyUYQ7QmxbYAzMA9GR9e3om853a0F1NtujppLstYUXm1He gyPXtaUC1FWf3TA93SR3zu1dUI4xrczLawMQB12bHPbLhPJ+71kQqMlvUc9lAn3/kR7C 5+ppBswK5+Njq/fzlFXf+p/bR9bYEan9kMi6XgUAPE72PNUaihko+bWUv/Iz+jRhPgRr EOilLS3UEb//tNpKcw45HdZF7rO1xJoA/OCdHmg/3oOwDCqd7b0wIu0O2Yty5ZanUAFk GovQ== X-Gm-Message-State: AOAM533JW0oCRt46pRM0EFgDutMOydedQtxrolu9Vzr3N6aDbBgyIiw2 289hn2Ndk4yLgDLoz2kWZ9RN2w== X-Google-Smtp-Source: ABdhPJzczY0iHbZsOdzXcPptqP7ZQc6xfg4Ex57eoTGC5ttbpqsHeQ6xE3s492CBLwkvRAeWrgFySQ== X-Received: by 2002:a63:2048:: with SMTP id r8mr3469627pgm.211.1644441650976; Wed, 09 Feb 2022 13:20:50 -0800 (PST) Received: from smtpclient.apple ([2601:646:101:7fda:91ad:44f0:6158:55da]) by smtp.gmail.com with ESMTPSA id s14sm21489293pfk.174.2022.02.09.13.20.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Feb 2022 13:20:50 -0800 (PST) From: Bryn Llewellyn Message-Id: <2001A55F-C2D4-4B82-A680-632ABC550019@yugabyte.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_2ECA35AD-8953-4542-BBF3-EEE8A0EEB80B" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: DELETING then INSERTING record with same PK in the same TRANSACTION Date: Wed, 9 Feb 2022 13:20:49 -0800 In-Reply-To: Cc: pgsql-general list To: "David G. Johnston" , Brent Wood , Andrew Hardy References: X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_2ECA35AD-8953-4542-BBF3-EEE8A0EEB80B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > david.g.johnston@gmail.com wrote: >=20 > 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 =3D 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.= --Apple-Mail=_2ECA35AD-8953-4542-BBF3-EEE8A0EEB80B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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 =3D 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.
= --Apple-Mail=_2ECA35AD-8953-4542-BBF3-EEE8A0EEB80B--