Re: Eliminate information_schema from oid2name listing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Kenji Sugita <sugita(at)srapc1327(dot)sra(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Eliminate information_schema from oid2name listing
Date: 2003-07-24 04:01:43
Message-ID: 200307240401.h6O41h926104@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Kenji Sugita wrote:
> 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

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-07-24 04:03:11 Re: Eliminate information_schema from oid2name listing
Previous Message Bruce Momjian 2003-07-24 02:26:43 Re: [HACKERS] clock_timestamp() and transcation_timestamp() patch