mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Improve getObjectDescription's display of pg_amop and pg_amproc entries.
Include the lefttype/righttype columns explicitly (instead of assuming the reader can deduce them from the operator or function description), and move the operator or function description to the end of the string, to make it clearer that it's a referenced object and not the amop or amproc item itself. Per extensive discussion of Andreas Karlsson's original patch. Andreas Karlsson, Tom Lane
This commit is contained in:
@ -2339,13 +2339,17 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* translator: %d is the operator strategy (a number), the
|
* translator: %d is the operator strategy (a number), the
|
||||||
* first %s is the textual form of the operator, and the
|
* first two %s's are data type names, the third %s is the
|
||||||
* second %s is the description of the operator family.
|
* description of the operator family, and the last %s is the
|
||||||
|
* textual form of the operator with arguments.
|
||||||
*/
|
*/
|
||||||
appendStringInfo(&buffer, _("operator %d %s of %s"),
|
appendStringInfo(&buffer, _("operator %d (%s, %s) of %s: %s"),
|
||||||
amopForm->amopstrategy,
|
amopForm->amopstrategy,
|
||||||
format_operator(amopForm->amopopr),
|
format_type_be(amopForm->amoplefttype),
|
||||||
opfam.data);
|
format_type_be(amopForm->amoprighttype),
|
||||||
|
opfam.data,
|
||||||
|
format_operator(amopForm->amopopr));
|
||||||
|
|
||||||
pfree(opfam.data);
|
pfree(opfam.data);
|
||||||
|
|
||||||
systable_endscan(amscan);
|
systable_endscan(amscan);
|
||||||
@ -2385,14 +2389,18 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
getOpFamilyDescription(&opfam, amprocForm->amprocfamily);
|
getOpFamilyDescription(&opfam, amprocForm->amprocfamily);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* translator: %d is the function number, the first %s is the
|
* translator: %d is the function number, the first two %s's
|
||||||
* textual form of the function with arguments, and the second
|
* are data type names, the third %s is the description of the
|
||||||
* %s is the description of the operator family.
|
* operator family, and the last %s is the textual form of the
|
||||||
|
* function with arguments.
|
||||||
*/
|
*/
|
||||||
appendStringInfo(&buffer, _("function %d %s of %s"),
|
appendStringInfo(&buffer, _("function %d (%s, %s) of %s: %s"),
|
||||||
amprocForm->amprocnum,
|
amprocForm->amprocnum,
|
||||||
format_procedure(amprocForm->amproc),
|
format_type_be(amprocForm->amproclefttype),
|
||||||
opfam.data);
|
format_type_be(amprocForm->amprocrighttype),
|
||||||
|
opfam.data,
|
||||||
|
format_procedure(amprocForm->amproc));
|
||||||
|
|
||||||
pfree(opfam.data);
|
pfree(opfam.data);
|
||||||
|
|
||||||
systable_endscan(amscan);
|
systable_endscan(amscan);
|
||||||
|
Reference in New Issue
Block a user