diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 63aecb0..3d21aa0 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -763,8 +763,10 @@ pg_get_indexdef_worker(Oid indexrelid, int colno, bool showTblSpc,
 			char	   *attname;
 
 			attname = get_relid_attribute_name(indrelid, attnum);
-			if (!colno || colno == keyno + 1)
+			if (!colno || colno == keyno + 1 || colno == -999)
 				appendStringInfoString(&buf, quote_identifier(attname));
+                        if (colno == -999 && keyno < idxrec->indnatts-1 )
+                                appendStringInfoString(&buf, sep);
 			keycoltype = get_atttype(indrelid, attnum);
 		}
 		else
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 709e10e..c3fd222 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2123,8 +2123,12 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
 
 	if (showIndexes)
 		appendPQExpBuffer(&buf,
-						  ",\n c2.relname as \"%s\"",
-						  gettext_noop("Table"));
+						  ",\n c2.relname as \"%s\""
+                                                  ",\n am.amname as \"%s\""
+                                                  ",\n COALESCE(pg_get_expr(i.indexprs,i.indrelid),pg_get_indexdef(i.indexrelid,-999,TRUE)) as \"%s\"",
+						  gettext_noop("Table"),
+                                                  gettext_noop("Method"),
+                                                  gettext_noop("Expression"));
 
 	if (verbose && pset.sversion >= 80100)
 		appendPQExpBuffer(&buf,
@@ -2141,7 +2145,9 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
 	if (showIndexes)
 		appendPQExpBuffer(&buf,
 			 "\n     LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid"
-		   "\n     LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid");
+                        "\n     LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid"
+                        "\n     LEFT JOIN pg_catalog.pg_am am ON am.oid = c.relam"
+                        );
 
 	appendPQExpBuffer(&buf, "\nWHERE c.relkind IN (");
 	if (showTables)
