On Thu, Dec 10, 2020 at 7:48 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> + if (!OidIsValid(col->collOid) &&
> + type_is_collatable(col->typeName->typeOid))
> + ereport(ERROR,
> ...
> + attrList = lappend(attrList, col);
>
> Should attrList be freed when ereport is called ?
>
I think that's not necessary since we are going to throw an error
anyways. And also that this is not a new code added as part of this
feature, it is an existing code adjusted for parallel inserts. On
looking further in the code base there are many places where we don't
free up the lists before throwing errors.
errmsg("column privileges are only valid for relations")));
errmsg("check constraint \"%s\" already exists",
errmsg("name or argument lists may not contain nulls")));
elog(ERROR, "no tlist entry for key %d", keyresno);
> + query->CTASParallelInsInfo &= CTAS_PARALLEL_INS_UNDEF;
>
> Since CTAS_PARALLEL_INS_UNDEF is 0, isn't the above equivalent to assigning the value of 0 ?
>
Yeah both are equivalent. For now I will keep it that way, I will
change it in the next version of the patch.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com