88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.72 2008/05/12 00:00:46 alvherre Exp $
11+ * $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.73 2008/06/05 15:04:39 alvherre Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -2005,6 +2005,7 @@ getObjectDescription(const ObjectAddress *object)
20052005SysScanDesc amscan ;
20062006HeapTuple tup ;
20072007Form_pg_amop amopForm ;
2008+ StringInfoData opfam ;
20082009
20092010amopDesc = heap_open (AccessMethodOperatorRelationId ,
20102011AccessShareLock );
@@ -2025,10 +2026,18 @@ getObjectDescription(const ObjectAddress *object)
20252026
20262027amopForm = (Form_pg_amop )GETSTRUCT (tup );
20272028
2028- appendStringInfo (& buffer ,_ ("operator %d %s of " ),
2029+ initStringInfo (& opfam );
2030+ getOpFamilyDescription (& opfam ,amopForm -> amopfamily );
2031+ /*
2032+ * translator: %d is the operator strategy (a number), the
2033+ * first %s is the textual form of the operator, and the second
2034+ * %s is the description of the operator family.
2035+ */
2036+ appendStringInfo (& buffer ,_ ("operator %d %s of %s" ),
20292037amopForm -> amopstrategy ,
2030- format_operator (amopForm -> amopopr ));
2031- getOpFamilyDescription (& buffer ,amopForm -> amopfamily );
2038+ format_operator (amopForm -> amopopr ),
2039+ opfam .data );
2040+ pfree (opfam .data );
20322041
20332042systable_endscan (amscan );
20342043heap_close (amopDesc ,AccessShareLock );
@@ -2042,6 +2051,7 @@ getObjectDescription(const ObjectAddress *object)
20422051SysScanDesc amscan ;
20432052HeapTuple tup ;
20442053Form_pg_amproc amprocForm ;
2054+ StringInfoData opfam ;
20452055
20462056amprocDesc = heap_open (AccessMethodProcedureRelationId ,
20472057AccessShareLock );
@@ -2062,10 +2072,18 @@ getObjectDescription(const ObjectAddress *object)
20622072
20632073amprocForm = (Form_pg_amproc )GETSTRUCT (tup );
20642074
2065- appendStringInfo (& buffer ,_ ("function %d %s of " ),
2075+ initStringInfo (& opfam );
2076+ getOpFamilyDescription (& opfam ,amprocForm -> amprocfamily );
2077+ /*
2078+ * translator: %d is the function number, the first %s is the
2079+ * textual form of the function with arguments, and the second
2080+ * %s is the description of the operator family.
2081+ */
2082+ appendStringInfo (& buffer ,_ ("function %d %s of %s" ),
20662083amprocForm -> amprocnum ,
2067- format_procedure (amprocForm -> amproc ));
2068- getOpFamilyDescription (& buffer ,amprocForm -> amprocfamily );
2084+ format_procedure (amprocForm -> amproc ),
2085+ opfam .data );
2086+ pfree (opfam .data );
20692087
20702088systable_endscan (amscan );
20712089heap_close (amprocDesc ,AccessShareLock );