Eliminate information_schema from oid2name listing

Поиск
Список
Период
Сортировка
От Kenji Sugita
Тема Eliminate information_schema from oid2name listing
Дата
Msg-id 20030721.125425.74726057.sugita@srapc1327.sra.co.jp
обсуждение исходный текст
Ответы Re: Eliminate information_schema from oid2name listing  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Eliminate information_schema from oid2name listing  (Peter Eisentraut <peter_e@gmx.net>)
Re: Eliminate information_schema from oid2name listing  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Eliminate information_schema from oid2name listing  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
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);
 }

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: An additional foreign key test for regression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Eliminate information_schema from oid2name listing