preprocess_except_pubobj_list:
+ Assert(pubobj->pubobjtype == PUBLICATIONOBJ_EXCEPT_TABLE ||
+ pubobj->pubobjtype == PUBLICATIONOBJ_CONTINUATION);
+
We need Sanity check on each object of the list rather than on first
object alone i.e. each object should have type EXCEPT or its
continuation. Thus it makes more sense to move Assert inside 'for
loop' and add a comment too:
<please feel free to change comment if needed>
foreach(cell, pubexceptobjspec_list)
{
pubobj = (PublicationObjSpec *) lfirst(cell);
/*
* The object type must be either PUBLICATIONOBJ_EXCEPT_TABLE or
* PUBLICATIONOBJ_CONTINUATION. It cannot be PUBLICATIONOBJ_TABLE,
* PUBLICATIONOBJ_TABLES_IN_SCHEMA or
* PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA here.
*/
Assert(pubobj->pubobjtype == PUBLICATIONOBJ_EXCEPT_TABLE ||
pubobj->pubobjtype == PUBLICATIONOBJ_CONTINUATION);
.....
thanks
Shveta