Here is a very simple change of the patch to make the output look more
like the syntax of ALTER OPERATOR FAMILY to improve consistency.

Before patch:

function 1 bttextcmp(text,text) of operator family array_ops for access method 
gin

With the first version:

function 1 bttextcmp(text,text) of operator family array_ops for access method 
gin for (text[],text[])

With this version:

function 1 (text[],text[]) bttextcmp(text,text) of operator family array_ops 
for access method gin

Andreas

diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c
index ec8eb74..6bfb3c9 100644
*** a/src/backend/catalog/dependency.c
--- b/src/backend/catalog/dependency.c
*************** getObjectDescription(const ObjectAddress
*** 2389,2396 ****
  				 * 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),
  								 opfam.data);
  				pfree(opfam.data);
--- 2389,2398 ----
  				 * textual form of the function with arguments, and the second
  				 * %s is the description of the operator family.
  				 */
! 				appendStringInfo(&buffer, _("function %d (%s,%s) %s of %s"),
  								 amprocForm->amprocnum,
+ 								 format_type_be(amprocForm->amproclefttype),
+ 								 format_type_be(amprocForm->amprocrighttype),
  								 format_procedure(amprocForm->amproc),
  								 opfam.data);
  				pfree(opfam.data);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to