This small patch eliminates relations in information_schema from oid2name
listing.
Index: oid2name.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/oid2name/oid2name.c,v
retrieving revision 1.18
diff -u -r1.18 oid2name.c
--- oid2name.c  14 May 2003 03:25:56 -0000      1.18
+++ oid2name.c  21 Jul 2003 03:49:57 -0000
@@ -355,7 +355,10 @@
        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");
+               snprintf(todo, 1024, "select relfilenode,relname "
+                                "from pg_class c, pg_namespace n "
+                                "where c.relnamespace = n.oid and n.nspname != 
'information_schema' and c.relname not like 'pg_%%' "
+                                "order by c.relname");
 
        sql_exec(conn, todo, 0);
 }
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to