@@ -1552,7 +1552,7 @@ get_object_address_opf_member(ObjectType objtype,
1552
1552
ObjectAddress address ;
1553
1553
ListCell * cell ;
1554
1554
List * copy ;
1555
- char * typenames [2 ];
1555
+ TypeName * typenames [2 ];
1556
1556
Oid typeoids [2 ];
1557
1557
int membernum ;
1558
1558
int i ;
@@ -1574,8 +1574,8 @@ get_object_address_opf_member(ObjectType objtype,
1574
1574
{
1575
1575
ObjectAddress typaddr ;
1576
1576
1577
- typenames [i ] = strVal ( lfirst (cell ));
1578
- typaddr = get_object_address_type (OBJECT_TYPE , castNode ( TypeName , lfirst ( cell )) , missing_ok );
1577
+ typenames [i ] = castNode ( TypeName , lfirst (cell ));
1578
+ typaddr = get_object_address_type (OBJECT_TYPE , typenames [ i ] , missing_ok );
1579
1579
typeoids [i ] = typaddr .objectId ;
1580
1580
if (++ i >= 2 )
1581
1581
break ;
@@ -1601,7 +1601,9 @@ get_object_address_opf_member(ObjectType objtype,
1601
1601
ereport (ERROR ,
1602
1602
(errcode (ERRCODE_UNDEFINED_OBJECT ),
1603
1603
errmsg ("operator %d (%s, %s) of %s does not exist" ,
1604
- membernum , typenames [0 ], typenames [1 ],
1604
+ membernum ,
1605
+ TypeNameToString (typenames [0 ]),
1606
+ TypeNameToString (typenames [1 ]),
1605
1607
getObjectDescription (& famaddr ))));
1606
1608
}
1607
1609
else
@@ -1630,7 +1632,9 @@ get_object_address_opf_member(ObjectType objtype,
1630
1632
ereport (ERROR ,
1631
1633
(errcode (ERRCODE_UNDEFINED_OBJECT ),
1632
1634
errmsg ("function %d (%s, %s) of %s does not exist" ,
1633
- membernum , typenames [0 ], typenames [1 ],
1635
+ membernum ,
1636
+ TypeNameToString (typenames [0 ]),
1637
+ TypeNameToString (typenames [1 ]),
1634
1638
getObjectDescription (& famaddr ))));
1635
1639
}
1636
1640
else
@@ -2023,7 +2027,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
2023
2027
}
2024
2028
2025
2029
/*
2026
- * get_object_name is pretty sensitive to the length its input lists;
2030
+ * get_object_address is pretty sensitive to the length its input lists;
2027
2031
* check that they're what it wants.
2028
2032
*/
2029
2033
switch (type )
@@ -2064,7 +2068,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
2064
2068
}
2065
2069
2066
2070
/*
2067
- * Now build the Node type that get_object_name () expects for the given
2071
+ * Now build the Node type that get_object_address () expects for the given
2068
2072
* type.
2069
2073
*/
2070
2074
switch (type )
0 commit comments