Patch attached and applied.
---------------------------------------------------------------------------
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Kenji Sugita writes:
> >> This small patch eliminates relations in information_schema from oid2name
> >> listing.
>
> > Why would one want to do that?
>
> AFAICS the point of oid2name is to provide a mapping between disk file
> names and table names. As such, what it *ought* to be doing is
> suppressing views, since those don't have disk files --- they are only
> cluttering the listing with irrelevant data. If we put that in, there'd
> be no need to special-case information_schema.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: contrib/oid2name/oid2name.c
===================================================================
RCS file: /cvsroot/pgsql-server/contrib/oid2name/oid2name.c,v
retrieving revision 1.18
diff -c -c -r1.18 oid2name.c
*** contrib/oid2name/oid2name.c 14 May 2003 03:25:56 -0000 1.18
--- contrib/oid2name/oid2name.c 27 Jul 2003 04:42:11 -0000
***************
*** 355,361 ****
if (systables == 1)
snprintf(todo, 1024, "select relfilenode,relname from pg_class order by relname");
else
! snprintf(todo, 1024, "select relfilenode,relname from pg_class where relname not like 'pg_%%' order by
relname");
sql_exec(conn, todo, 0);
}
--- 355,363 ----
if (systables == 1)
snprintf(todo, 1024, "select relfilenode,relname from pg_class order by relname");
else
! snprintf(todo, 1024, "select relfilenode,relname from pg_class "
! "where reltype not in ('v','c') and "
! "relname not like 'pg_%%' order by relname");
sql_exec(conn, todo, 0);
}