只有在redshift中显示的pg_catalog表

时间:2015-11-03 18:47:36

标签: amazon-web-services amazon-redshift

当我在redshift中运行此查询时:

select distinct schemaname, tablename from pg_table_def;

我只返回pg_catalog架构而不是用户架构。我在admin用户下运行查询,并且也在其他用户名下运行它,但同样的事情发生了。我没有'得到无系统架构。

2 个答案:

答案 0 :(得分:1)

确保您的search_path用户/会话参数正确列出了所需的架构名称。

答案 1 :(得分:0)

尝试以下代码

select * from information_schema.tables where table_name like '%pg%'

表information_schema.tabes可以帮助您找到所有的pg表