From: Peter Eisentraut Date: Thu, 31 Aug 2023 09:11:59 +0000 (+0200) Subject: Correct ObjectProperty entry for transforms X-Git-Tag: REL_17_BETA1~1924 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7ceb41b9b84092517bbd7aa1ea6c446f023504e;p=thirdparty%2Fpostgresql.git Correct ObjectProperty entry for transforms There was some confusion in the ObjectProperty entry for transforms. Some fields had values that were apparently meant for a different field. Also, some fields were not assigned, which is okay for most fields, but not for all. In particular, for .oid_catcache_id, .name_catcache_id, and .objtype, zero is a valid value, so we need to use -1 if not applicable. It has apparently been like that from the very beginning (commit cac7658205). The faulty values were not actually reachable, so it's not a big problem in practice, but we should make it correct. Discussion: https://www.postgresql.org/message-id/flat/75ae5875-3abc-dafc-8aec-73247ed41cde@eisentraut.org --- diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 95fefc7565b..715201f5a25 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -462,8 +462,14 @@ static const ObjectPropertyType ObjectProperty[] = TransformRelationId, TransformOidIndexId, TRFOID, + -1, + Anum_pg_transform_oid, + InvalidAttrNumber, + InvalidAttrNumber, InvalidAttrNumber, - Anum_pg_transform_oid + InvalidAttrNumber, + -1, + false }, { "trigger",