SysScanDesc amscan;
HeapTuple tup;
Form_pg_amop amopForm;
+ StringInfoData opfam;
amopDesc = heap_open(AccessMethodOperatorRelationId,
AccessShareLock);
amopForm = (Form_pg_amop) GETSTRUCT(tup);
- appendStringInfo(&buffer, _("operator %d %s of "),
+ initStringInfo(&opfam);
+ getOpFamilyDescription(&opfam, amopForm->amopfamily);
+ /*
+ * translator: %d is the operator strategy (a number), the
+ * first %s is the textual form of the operator, and the second
+ * %s is the description of the operator family.
+ */
+ appendStringInfo(&buffer, _("operator %d %s of %s"),
amopForm->amopstrategy,
- format_operator(amopForm->amopopr));
- getOpFamilyDescription(&buffer, amopForm->amopfamily);
+ format_operator(amopForm->amopopr),
+ opfam.data);
+ pfree(opfam.data);
systable_endscan(amscan);
heap_close(amopDesc, AccessShareLock);
SysScanDesc amscan;
HeapTuple tup;
Form_pg_amproc amprocForm;
+ StringInfoData opfam;
amprocDesc = heap_open(AccessMethodProcedureRelationId,
AccessShareLock);
amprocForm = (Form_pg_amproc) GETSTRUCT(tup);
- appendStringInfo(&buffer, _("function %d %s of "),
+ initStringInfo(&opfam);
+ getOpFamilyDescription(&opfam, amprocForm->amprocfamily);
+ /*
+ * translator: %d is the function number, the first %s is the
+ * textual form of the function with arguments, and the second
+ * %s is the description of the operator family.
+ */
+ appendStringInfo(&buffer, _("function %d %s of %s"),
amprocForm->amprocnum,
- format_procedure(amprocForm->amproc));
- getOpFamilyDescription(&buffer, amprocForm->amprocfamily);
+ format_procedure(amprocForm->amproc),
+ opfam.data);
+ pfree(opfam.data);
systable_endscan(amscan);
heap_close(amprocDesc, AccessShareLock);