From e721e58c03d5f2c337a8ccb209511d4e483fd54c Mon Sep 17 00:00:00 2001
From: "Marc G. Fournier" <scrappy@hub.org>
Date: Fri, 6 Jun 1997 22:05:23 +0000
Subject: [PATCH] From: Darren King <aixssd!darrenk@abs.net> Subject: [PATCHES]
 psql and large objects fix

Psql was broken by using "Inv[0-9]+" instead of "xin[xv][0-9]+" to not
show large object files.  Been this way for a long time too. Relic of
an older naming convention, perhaps?
---
 src/bin/psql/psql.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index cb0208a672b..baaacbf4707 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.71 1997/06/06 01:41:24 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.72 1997/06/06 22:05:23 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -250,8 +250,8 @@ tableList(PsqlSettings * ps, bool deep_tablelist, char table_index_both)
  		default:	strcat(listbuf, "WHERE ( relkind = 'r' OR relkind = 'i') ");
  		 		break;
  	}
-    strcat(listbuf, "  and relname !~ '^pg_'");
-    strcat(listbuf, "  and relname !~ '^Inv[0-9]+'");
+	strcat(listbuf, "  and relname !~ '^pg_'");
+	strcat(listbuf, "  and relname !~ '^xin[vx][0-9]+'");
     /*
      * the usesysid = relowner won't work on stock 1.0 dbs, need to add in
      * the int4oideq function
@@ -341,7 +341,7 @@ rightsList(PsqlSettings * ps)
     strcat(listbuf, "  FROM pg_class, pg_user ");
     strcat(listbuf, "WHERE ( relkind = 'r' OR relkind = 'i') "); 
     strcat(listbuf, "  and relname !~ '^pg_'");
-    strcat(listbuf, "  and relname !~ '^Inv[0-9]+'");
+    strcat(listbuf, "  and relname !~ '^xin[vx][0-9]+'");
     strcat(listbuf, "  and usesysid = relowner");
     strcat(listbuf, "  ORDER BY relname ");
     if (!(res = PSQLexec(ps, listbuf)))
@@ -1174,9 +1174,9 @@ HandleSlashCmds(PsqlSettings * settings,
     case 'd':			/* \d describe tables or columns in a table */
  	if (strncmp(cmd, "dt", 2) == 0) {		/* only tables */
  		tableList(settings, 0, 't');
- 	} else if (strncmp(cmd, "di", 2) == 0) {	/* only tables */
+ 	} else if (strncmp(cmd, "di", 2) == 0) {	/* only indicies */
  		tableList(settings, 0, 'i');
- 	} else if (!optarg) {				/* show'em both */
+ 	} else if (!optarg) {				/* show tables and indicies */
  	    tableList(settings, 0, 'b');
  	} else if (strcmp(optarg, "*") == 0) {		/* show everything */
  	    tableList(settings, 0, 'b');
-- 
GitLab