A problem in ExecModifyTable

Поиск
Список
Период
Сортировка
От 李杰(慎追)
Тема A problem in ExecModifyTable
Дата
Msg-id 9d5f2dfd-db10-47f2-b97a-61d5a40e4454.adger.lj@alibaba-inc.com
обсуждение исходный текст
Ответы Re: A problem in ExecModifyTable  (David Rowley <dgrowleyml@gmail.com>)
Список 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


        


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: return correct error code from pgtls_init