SELECT oid AS dboid
FROM pg_database
WHERE datname = 'database1';
SELECT relfilenode AS tfile
FROM pg_class
WHERE relname = 'table1';
SELECT i.relfilenode AS ifile, i.relname
FROM
pg_class c
JOIN pg_index x
ON x.indrelid = c.oid
JOIN pg_class i
ON i.oid = x.indexrelid
WHERE c.relname = 'table1';
Путь к файлу таблицы выглядит так:
<path_to_pg_data>/base/<dboid>/<tfile>
А пути к индексам так:
<path_to_pg_data>/base/<dboid>/<ifile>
No comments:
Post a Comment