mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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?
This commit is contained in:
parent
e318022e1a
commit
e721e58c03
@ -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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -251,7 +251,7 @@ tableList(PsqlSettings * ps, bool deep_tablelist, char table_index_both)
|
||||
break;
|
||||
}
|
||||
strcat(listbuf, " and relname !~ '^pg_'");
|
||||
strcat(listbuf, " and relname !~ '^Inv[0-9]+'");
|
||||
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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user