Hi Shlok -

Here are some minor review comments for patch v5-0002.

======
doc/src/sgml/catalogs.sgml

1.
       <para>
-       True if the table is excluded from the publication. See
-       <link 
linkend="sql-createpublication-params-for-except-table"><literal>EXCEPT</literal></link>.
+       True if the table or the sequence is excluded from the publication. See
+       <link 
linkend="sql-createpublication-params-for-except"><literal>EXCEPT</literal></link>.

/or the sequence/or sequence/

======
src/backend/catalog/pg_publication.c

check_publication_add_relation:

2.
  * Check if relation can be in given publication and throws appropriate
  * error if not.

~

Too terse. There are missing words.

SUGGESTION
Check if the target relation is allowed to be specified in the given
publication and throw an error if not.

~~~

3.
if (pri->except)
{
relname = RelationGetQualifiedRelationName(targetrel);
if (pubrelkind == RELKIND_SEQUENCE)
errormsg = gettext_noop("cannot specify \"%s\" in the publication
EXCEPT (SEQUENCE) clause");
else
errormsg = gettext_noop("cannot specify \"%s\" in the publication
EXCEPT (TABLE) clause");
}
else
{
relname = RelationGetRelationName(targetrel);
errormsg = gettext_noop("cannot add relation \"%s\" to publication");
}

~

Wondering why sometimes the error `relname` is fully-qualified and
sometimes it is not. Isn't it better to always be qualified?

======
Kind Regards,
Peter Smith.
Fujitsu Australia


Reply via email to