Re: Skipping schema changes in publication - Mailing list pgsql-hackers

From shveta malik
Subject Re: Skipping schema changes in publication
Date
Msg-id CAJpy0uC1Lq01mu8OuXzWkMHSAVUAxs_bdVdoqqu4VDW1PemteA@mail.gmail.com
Whole thread Raw
In response to Re: Skipping schema changes in publication  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition
Next
From: Ajin Cherian
Date:
Subject: Re: pg_publication_tables: return NULL attnames when no column list is specified