public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dean Rasheed <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: jian he <[email protected]>
Subject: Re: Virtual generated columns
Date: Mon, 27 Jan 2025 12:42:18 +0000
Message-ID: <CAEZATCX6SHevKrVfAOq+88b4Ysm4Rqq2yeO6He3N0pttEbjYag@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<CAEZATCU3q=znAL7X1aSxuMpjfSyB1cT5j398HPb9ix9ci_HUqA@mail.gmail.com>
<[email protected]>
<CAEZATCVLfMzNwT1J0bnvtv6YbmNSN9QSXb+1QSGyX6vK4q67Ow@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAEZATCUHnmOu7RtDuP+PCtS_dqvU8hFsAYYFPdiB8gyFszj5WQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAEZATCXQcjZPq+OsczFc13M6v+OP_NiqmUAcRAzi1K60KFuWmQ@mail.gmail.com>
<[email protected]>
<CAEZATCXnp5XTkUCsmfjLXVWZ7TaibWatnXDdu52J6zN3XsyZhw@mail.gmail.com>
<[email protected]>
<[email protected]>
On Mon, 27 Jan 2025 at 09:59, Peter Eisentraut <[email protected]> wrote:
>
> Here is an updated patch that integrates the above changes and also
> makes some adjustments now that the logical replication configuration
> questions are resolved. I think this is complete now.
>
In struct ResultRelInfo, the following field is added:
int ri_NumGeneratedNeededI;
int ri_NumGeneratedNeededU;
+ /* true if the above have been computed */
+ bool ri_Generated_valid;
+
but that doesn't really seem to be accurate, because it's set to true
by ExecInitGenerated() whether it's called with CMD_INSERT or
CMD_UPDATE, so it will be true before both the other fields are
computed. It's used from ExecGetExtraUpdatedCols() as an indicator
that ri_extraUpdatedCols is valid, but it looks like that might not be
the case, if ExecInitGenerated() was only called with CMD_INSERT.
I'm not sure if that represents an actual bug, but it looks wrong. It
should perhaps be called "ri_extraUpdatedCols_valid", and only set to
true when ExecInitGenerated() is called with CMD_UPDATE, and
ri_extraUpdatedCols is populated.
Regards,
Dean
view thread (75+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Virtual generated columns
In-Reply-To: <CAEZATCX6SHevKrVfAOq+88b4Ysm4Rqq2yeO6He3N0pttEbjYag@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox