Hi, While providing thoughts on [1], I observed that the error messages that are emitted while adding foreign, temporary and unlogged tables can be improved a bit from the existing [2] to [3]. For instance, the existing message when foreign table is tried to add into the publication "f1" is not a table" looks odd. Because it says that the foreign table is not a table at all.
Attaching a small patch. Thoughts? [1] - https://www.postgresql.org/message-id/CALj2ACWAxO3vSToT0o5nXL%3Drz5cNx90zaV-at%3DcvM14Tag4%3DcQ%40mail.gmail.com [2] - t1 is a temporary table: postgres=# CREATE PUBLICATION testpub FOR TABLE t1; ERROR: table "t1" cannot be replicated DETAIL: Temporary and unlogged relations cannot be replicated. t1 is an unlogged table: postgres=# CREATE PUBLICATION testpub FOR TABLE t1; ERROR: table "t1" cannot be replicated DETAIL: Temporary and unlogged relations cannot be replicated. f1 is a foreign table: postgres=# CREATE PUBLICATION testpub FOR TABLE f1; ERROR: "f1" is not a table DETAIL: Only tables can be added to publications. [3] - t1 is a temporary table: postgres=# CREATE PUBLICATION testpub FOR TABLE t1; ERROR: temporary table "t1" cannot be replicated DETAIL: Temporary, unlogged and foreign relations cannot be replicated. t1 is an unlogged table: postgres=# CREATE PUBLICATION testpub FOR TABLE t1; ERROR: unlogged table "t1" cannot be replicated DETAIL: Temporary, unlogged and foreign relations cannot be replicated. f1 is a foreign table: postgres=# CREATE PUBLICATION testpub FOR TABLE f1; ERROR: foreign table "f1" cannot be replicated DETAIL: Temporary, unlogged and foreign relations cannot be replicated. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com
v1-0001-Improve-error-message-while-adding-tables-to-publ.patch
Description: Binary data
