Skip to content

Commit c043dd6

Browse files
peterepull[bot]
authored andcommitted
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 cac7658). 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
1 parent e03458d commit c043dd6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,14 @@ static const ObjectPropertyType ObjectProperty[] =
462462
TransformRelationId,
463463
TransformOidIndexId,
464464
TRFOID,
465+
-1,
466+
Anum_pg_transform_oid,
467+
InvalidAttrNumber,
468+
InvalidAttrNumber,
465469
InvalidAttrNumber,
466-
Anum_pg_transform_oid
470+
InvalidAttrNumber,
471+
-1,
472+
false
467473
},
468474
{
469475
"trigger",

0 commit comments

Comments
 (0)