HeapTuple tup;
char *pubname;
Form_pg_publication_rel prform;
+ StringInfoData rel;
tup = SearchSysCache1(PUBLICATIONREL,
ObjectIdGetDatum(object->objectId));
prform = (Form_pg_publication_rel) GETSTRUCT(tup);
pubname = get_publication_name(prform->prpubid);
- appendStringInfo(&buffer, _("publication table %s in publication %s"),
- get_rel_name(prform->prrelid), pubname);
+ initStringInfo(&rel);
+ getRelationDescription(&rel, prform->prrelid);
+
+ /* translator: first %s is, e.g., "table %s" */
+ appendStringInfo(&buffer, _("publication of %s in publication %s"),
+ rel.data, pubname);
+ pfree(rel.data);
ReleaseSysCache(tup);
break;
}
/*
* subroutine for getObjectDescription: describe a relation
+ *
+ * The result is appended to "buffer".
*/
static void
getRelationDescription(StringInfo buffer, Oid relid)
prform = (Form_pg_publication_rel) GETSTRUCT(tup);
pubname = get_publication_name(prform->prpubid);
- appendStringInfo(&buffer, _("%s in publication %s"),
- get_rel_name(prform->prrelid), pubname);
+ getRelationIdentity(&buffer, prform->prrelid, objname);
+ appendStringInfo(&buffer, " in publication %s", pubname);
- if (objname)
- {
- getRelationIdentity(&buffer, prform->prrelid, objname);
+ if (objargs)
*objargs = list_make1(pubname);
- }
ReleaseSysCache(tup);
break;