Skip site navigation (1) Skip section navigation (2)

Re: Numeric file names

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Numeric file names
Date: 2000-10-28 21:58:10
Message-ID: Pine.LNX.4.21.0010282349150.763-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian writes:

> Now that we have numeric file names, I would like to have a command I
> can run from psql that will dump a mapping of numeric file name to table
> name, i.e.,
> 
> 	121233	pg_proc
> 	143423	pg_index

select oid, relname from pg_class;

> With that feature, I can write scripts pgfile2name and pgname2file that
> map file names to table names.  People can run standard Unix commands
> and have meaningful display output:
> 
> 	ls -l | pgfile2name

sed `psql -Aqt -d ${database} -c "select'-e s/' || oid || '/' || relname || '/g' from pg_class"`


What I'd find useful is a program that you can occasionally run on a
database directory that creates links from "name" to "oid".

-- 
Peter Eisentraut      peter_e(at)gmx(dot)net       http://yi.org/peter-e/


In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-10-28 22:07:53
Subject: Re: Numeric file names
Previous:From: Tom LaneDate: 2000-10-28 20:57:26
Subject: Re: Proposal for DROP TABLE rollback mechanism

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group