简体   繁体   English

什么是Postgres中的pg_class,以及如何使用pgAdmin 4看到它?

[英]What is pg_class in Postgres and how to see it using pgAdmin 4?

I'm new to Postgresql and I just saw my friends query on a cakePhp controller that call 'pq_class'. 我是Postgresql的新手,我刚刚看到我的朋友在一个名为“ pq_class”的cakePhp控制器上查询。 I tried to look up to my PostgreSQL database and find out what's inside using pgAgmin4. 我试图查找我的PostgreSQL数据库,并使用pgAgmin4找出其中的内容。

Unfortunately, I can't see any table name with 'pg_class'. 不幸的是,我看不到任何带有'pg_class'的表名。 I tried to google and find these pages : 我试图谷歌,找到这些页面:

https://www.postgresql.org/docs/current/catalog-pg-class.html https://www.postgresql.org/docs/current/catalog-pg-class.html

postgreSQL - pg_class question postgreSQL-pg_class问题

But I am still confused about pg_class . 但是我仍然对pg_class感到困惑。 Is there any good or real explanation about pg_class and how to see it using pgAdmin4 without using any query (just right click -> view data) 是否有关于pg_class以及如何在不使用任何查询的情况下使用pgAdmin4进行查看的任何好的或真实的解释(只需右键单击->查看数据)

pg_class is an internal system table that stores information about tables (and similar objects") available in the database. Every database product has such a collection of system tables (and views) that it maintains. pg_class是一个内部系统表,用于存储有关数据库中可用表(和类似对象)的信息。每个数据库产品都维护着这样的系统表 (和视图) 集合

You can (and in most cases should) use the views from the information_schema if you want to see information about tables, columns, views and other database objects. 如果要查看有关表,列,视图和其他数据库对象的information_schema则可以(并且在大多数情况下应使用)来自information_schema视图。

You can get details from information_schema on pgadmin like this. 您可以像这样从pgadmin上的information_schema中获取详细信息。

` SELECT * FROM information_schema.columns; `SELECT * FROM information_schema.columns;

select * from information_schema.tables` 从information_schema.tables中选择*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 postgres pg_class reltablespace 设置为实际值,而不是 0? - How to set postgres pg_class reltablespace to the actual value, not 0? 如果表意外从 pg_class 中删除,那么如何从备份中恢复它? - If a table is dropped from pg_class accidentally then how to restore it from backup? 如何在 pg_class 中为 object 创建日期转储添加新列 - how to add new column in pg_class for object creation date dumping 创建临时表不会导致pg_class表碎片 - Does creating a temp table cause the pg_class table to fragment 在 pg_class 中找不到临时表 - Can't find temporary table in pg_class 如何使用pgadmin创建pg_dump - How to create pg_dump using pgadmin 频繁创建临时表导致 pg_class OID 耗尽 - pg_class OID exhaustion by frequently creating temporary tables 如何在pgAdmin 4中查看postgres表的实际行数? - How to see the actual row count for a postgres table in pgAdmin 4? "<i>Could not complete schema update: org.h2.jdbc.JdbcSQLException: Table &quot;PG_CLASS&quot; not found;<\/i>无法完成架构更新:org.h2.jdbc.JdbcSQLException:找不到表“PG_CLASS”;<\/b> <i>SQL statement<\/i> SQL 语句<\/b>" - Could not complete schema update: org.h2.jdbc.JdbcSQLException: Table "PG_CLASS" not found; SQL statement 如何使用 pgAdmin 从 .pg_dump 文件恢复数据库 - How to restore database from .pg_dump file using pgAdmin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM