Re: [HACKERS] UPDATE of partition key
От | Amit Khandekar |
---|---|
Тема | Re: [HACKERS] UPDATE of partition key |
Дата | |
Msg-id | CAJ3gD9d1_ywrLxYOin-aijo5xOPvd6QdO6AXZu0qUatErwSTGA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] UPDATE of partition key (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
On 12 May 2017 at 09:27, Amit Kapila <amit.kapila16@gmail.com> wrote: > > + is_partitioned_table = > + root_rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE; > + > + if (is_partitioned_table) > + ExecSetupPartitionTupleRouting( > + root_rel, > + /* Build WITH CHECK OPTION constraints for leaf partitions */ > + ExecInitPartitionWithCheckOptions(mtstate, root_rel); > + /* Build a projection for each leaf partition rel. */ > + ExecInitPartitionReturningProjection(mtstate, root_rel); > .. > + /* It's not a partitioned table after all; error out. */ > + ExecPartitionCheckEmitError(resultRelInfo, slot, estate); > > When we are anyway going to give error if table is not a partitioned > table, then isn't it better to give it early when we first identify > that. Yeah that's right, fixed. Moved the partitioned table check early. This also showed that there is no need for is_partitioned_table variable. Accordingly adjusted the code. > - > +static void ExecInitPartitionWithCheckOptions(ModifyTableState *mtstate, > + Relation root_rel); > Spurious line delete. Done. Also rebased the patch over latest code. Attached v8 patch. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: