@@ -115,8 +115,8 @@ check_publication_add_schema(Oid schemaid)
115115 * Returns if relation represented by oid and Form_pg_class entry
116116 * is publishable.
117117 *
118- * Does same checks as the above, but does not need relation to be opened
119- * and also does not throw errors.
118+ * Does same checks as check_publication_add_relation() above, but does not
119+ * need relation to be opened and also does not throw errors.
120120 *
121121 * XXX This also excludes all tables with relid < FirstNormalObjectId,
122122 * ie all tables created during initdb. This mainly affects the preinstalled
@@ -140,6 +140,15 @@ is_publishable_class(Oid relid, Form_pg_class reltuple)
140140 relid >= FirstNormalObjectId ;
141141}
142142
143+ /*
144+ * Another variant of is_publishable_class(), taking a Relation.
145+ */
146+ bool
147+ is_publishable_relation (Relation rel )
148+ {
149+ return is_publishable_class (RelationGetRelid (rel ), rel -> rd_rel );
150+ }
151+
143152/*
144153 * Filter out the partitions whose parent tables were also specified in
145154 * the publication.
@@ -179,15 +188,6 @@ filter_partitions(List *relids)
179188 return result ;
180189}
181190
182- /*
183- * Another variant of this, taking a Relation.
184- */
185- bool
186- is_publishable_relation (Relation rel )
187- {
188- return is_publishable_class (RelationGetRelid (rel ), rel -> rd_rel );
189- }
190-
191191/*
192192 * Returns true if any schema is associated with the publication, false if no
193193 * schema is associated with the publication.
0 commit comments