Re: oid2name

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: oid2name
Date: 2004-09-12 22:32:40
Message-ID: 200409122232.i8CMWeR27730@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Please submit any improvements you can. It certainly needs attention!

I think it is inconsistent in using oid for lookup. It was originally
written before relfilenode existed (hence the name _oid_2name, while it
should be relfilenode to name or something. Maybe when we move it to
scripts we can rename it.

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

Alvaro Herrera wrote:
> Hackers,
>
> I am in the process of fixing the oid2name contrib module. It needs a
> lot of care and feeding. Hopefully for the next release we can move it
> to src/bin/scripts so it can use the routines that are in common.c, and
> some of the ugliness can go.
>
> I think it will stay in contrib for 8.0 however, so it needs to be fixed
> now. While I was playing with it, I noticed several shortcomings:
>
> - it only works in the PUBLIC schema
> - it only knows about tables and databases, except when running in "show
> systables" mode, and then it will show all indexes, toast tables, etc
> - it only displays relfilenode and tablename
> - there's no way to query by relfilenode, only by Oid (note that the
> last two means the program is somewhat inconsistent)
>
>
> This last one IMHO makes the program somewhat useless, because what the
> user normally wants to know is what table does a certain file on disk
> belong to, and the Oid may not provide that.
>
> I want to fix this, by providing switches to allow querying by filenode,
> Oid and tablename; and to show not only filenode and name, but also
> schema and tablespace.
>
> Is this acceptable for this release? Other opinions?
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "This is a foot just waiting to be shot" (Andrew Dunstan)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
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

  • oid2name at 2004-09-12 22:16:27 from Alvaro Herrera

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-09-12 22:36:03 Re: pgxs default installation + various fixes
Previous Message Bruce Momjian 2004-09-12 22:23:22 Re: beta1 & beta2 & Windows & heavy load