Child tables inherit the distribition property from the parent table. Even
more, XL doesn't support a syntax of the form PARTITION OF .. DISTRIBUTED BY
and doesn't allow child tables to have a distribution property different than
the parent. So attaching this clause to the partition table does not make any
sense.
Per report from Virendra Kumar.
#ifdef PGXC
if (fout->isPostgresXL)
{
- /* Add the grammar extension linked to PGXC depending on data got from pgxc_class */
- if (tbinfo->pgxclocatortype != 'E')
+ /*
+ * Add table distribution syntax, unless we're dealing with a
+ * partiion table, in which case the information is derived from
+ * the parent table.
+ */
+ if (tbinfo->pgxclocatortype != 'E' && !tbinfo->ispartition &&
+ numParents == 0)
{
/* N: DISTRIBUTE BY ROUNDROBIN */
if (tbinfo->pgxclocatortype == 'N')