Re: [HACKERS] UPDATE of partition key
От | Amit Khandekar |
---|---|
Тема | Re: [HACKERS] UPDATE of partition key |
Дата | |
Msg-id | CAJ3gD9d=vwykMF3wM+VPhs7-iPdAFYC2gowTsTnGa-16UmNGgA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] UPDATE of partition key (Amit Khandekar <amitdkhan.pg@gmail.com>) |
Ответы |
Re: [HACKERS] UPDATE of partition key
|
Список | pgsql-hackers |
On 7 June 2017 at 16:42, Amit Khandekar <amitdkhan.pg@gmail.com> wrote: > The column bitmap set returned by GetUpdatedColumns() refer to > attribute numbers w.r.t. to the root partition. And the > mstate->resultRelInfo[] have attnos w.r.t. to the leaf partitions. So > we need to do something similar to map_partition_varattnos() to change > the updated columns attnos to the leaf partitions I was wrong about this. Each of the mtstate->resultRelInfo[] has its own corresponding RangeTblEntry with its own updatedCols having attnos accordingly adjusted to refer its own table attributes. So we don't have to do the mapping; we need to get modifedCols separately for each of the ResultRelInfo, rather than the root relinfo. > and walk down the > partition constraint expressions to find if the attnos are present > there. But this we will need to do. -- Thanks, -Amit Khandekar EnterpriseDB Corporation The Postgres Database Company
В списке pgsql-hackers по дате отправления: