如何读取postgresql数据目录中的文件

时间:2017-12-05 08:15:44

标签: postgresql pgadmin

如何读取postgresql中pgsql / data / base / 16384目录下的文件。 这些文件类似于二进制文件或dat文件。 我尝试使用pgAdmin在特定的表中导入它,但我得到这样的错误: see the below picture

此外,我尝试使用tar文件恢复整个数据库,但在使用pgadmin进行恢复时,我得到了“没有toc.dat标头”。

有没有办法在postgresql中读取data / base / 16384中的文件?

感谢我的朋友。

1 个答案:

答案 0 :(得分:0)

尝试使用pgAdmin:

select datname from pg_database where oid = 16384;
--connect to the database from return of above
select relname from pg_class where relfilenode = 11779;
--select * from <return of above>