Sorry for my delay getting back to this thread.
Here is an updated patch v3 which has the following changes.
1. API.
The publication_translate_columns function now optionally returns the
Bitmapset* (that it was building anyway). The function comment was
also changed.
The patch is not quite the radical change suggested above [1]. I found
the currently returned 'attarray' is used in multiple places (in
publication_add_relation) so it seemed less invasive to leave those
other publication_translate_columns parameters as-is.
2. Tests.
Patch is now also testing for duplicates in a publication column list
======
[1] https://www.postgresql.org/message-id/CAApHDvo2i1j_iCFcURx5q7jYe70qk4Ca7J%2B8Dt9_jSMOdooAOA%40mail.gmail.com
Kind Regards,
Peter Smith.
Fujitsu Australia