]> granicus.if.org Git - postgresql/commitdiff
From: Darren King <aixssd!darrenk@abs.net>
authorMarc G. Fournier <scrappy@hub.org>
Fri, 6 Jun 1997 22:05:23 +0000 (22:05 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Fri, 6 Jun 1997 22:05:23 +0000 (22:05 +0000)
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

index cb0208a672b2717bfcc80ee43e99fa40c75c9299..baaacbf470721be6ecf7832b0e4379495e925349 100644 (file)
@@ -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');