[GENERAL] Which file belongs to which database?

2003-07-24 Thread Thomas Kellerer
Hello all, just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? I have looked through the documentation of the system catalogs, but couldn't find any reference to that. The field datpath in pg_database is empty in my system (7.2 on Wind

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Shridhar Daithankar
On 25 Jul 2003 at 8:45, Thomas Kellerer wrote: > just out of curiosity: how can I find out which files in the PG_DATA directory > belong to which database/table? There is a contrib module oid2name. Use that. You can just find the oid of the object from catalog and search for that file. That's t

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Karsten Hilbert
> just out of curiosity: how can I find out which files in the PG_DATA > directory belong to which database/table? > > I have looked through the documentation of the system catalogs, but couldn't you should also look through the mailing list archives... Karsten -- GPG key ID E4071346 @ wwwkeys

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Thomas Kellerer
Shridhar Daithankar schrieb: On 25 Jul 2003 at 8:45, Thomas Kellerer wrote: just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? There is a contrib module oid2name. Use that. You can just find the oid of the object from catalog and search

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Tom Lane
Thomas Kellerer <[EMAIL PROTECTED]> writes: > Shridhar Daithankar schrieb: >> You can just find the oid of the object from catalog and search for that >> file. That's the principle. > That easy ? :-) Actually you must look at pg_class.relfilenode; this is initially the same as oid, but there are