• Tom Lane's avatar
    Fix objectaddress.c code for publication relations. · 1a31baf6
    Tom Lane authored
    getObjectDescription and getObjectIdentity failed to schema-qualify
    the name of the published table, which is bad in getObjectDescription and
    unforgivable in getObjectIdentity.  Actually, getObjectIdentity failed to
    emit the table's name at all unless "objname" output is requested, which
    accidentally works for some (all?) extant callers but is clearly not the
    intended API.  Somebody had also not gotten the memo that the output of
    getObjectIdentity is not to be translated.
    
    To fix getObjectDescription, I made it call getRelationDescription, which
    required refactoring the translatable string for the case, but is more
    future-proof in case we ever publish relations that aren't plain tables.
    While at it, I made the English output look like "publication of table X
    in publication Y"; the added "of" seems to me to make it read much better.
    
    Back-patch to v10 where publications were introduced.
    
    Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
    1a31baf6
objectaddress.c 134 KB