From: | 李杰(慎追) <adger(dot)lj(at)alibaba-inc(dot)com> |
---|---|
To: | "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | A problem in ExecModifyTable |
Date: | 2021-08-17 03:56:33 |
Message-ID: | 9d5f2dfd-db10-47f2-b97a-61d5a40e4454.adger.lj@alibaba-inc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
Recently, I noticed a great patch in pg 14.
"Rework planning and execution of UPDATE and DELETE. (86dc90056dfdbd9d1b891718d2e5614e3e432f35)"
This changes the DML execution of the partitioned table and makes it more friendly.
But I am very confused about the following changes:
```
+ relkind = resultRelInfo->ri_RelationDesc->rd_rel->relkind;
+ if (relkind == RELKIND_RELATION ||
+ relkind == RELKIND_MATVIEW ||
+ relkind == RELKIND_PARTITIONED_TABLE)
{
- char relkind;
- Datum datum;
- bool isNull;
-
- relkind = resultRelInfo->ri_RelationDesc->rd_rel->relkind;
- if (relkind == RELKIND_RELATION || relkind == RELKIND_MATVIEW)
- {
- datum = ExecGetJunkAttribute(slot,
- junkfilter->jf_junkAttNo,
- &isNull);
- /* shouldn't ever get a null result... */```
According to my understanding, the parent table of a partitioned table does not store any tuples.
Then why is "relkind = = RELKIND_PARTITIONED_TABLE" suddenly added here ?
There is no comment on this point in the code.
Can you answer my confusion? Be deeply grateful.
Regards & Thanks Adger
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-08-17 04:13:39 | Re: return correct error code from pgtls_init |
Previous Message | Michael Paquier | 2021-08-17 03:43:13 | Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode |