Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'. I tried to look up to my PostgreSQL database and find out what's inside using pgAgmin4.

Unfortunately, I can't see any table name with 'pg_class'. I tried to google and find these pages :

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

postgreSQL - pg_class question

But I am still confused about 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)

like image 283
Maryadi Poipo Avatar asked Oct 19 '25 04:10

Maryadi Poipo


1 Answers

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.

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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!