SELECT column_name, data_type FROM information_schema.columns ORDER BY ordinal_position;
In a PostgreSQL database, the above query can return rows, but I can't find information_schema.columns. Can you tell me where it is?
It is in a separate Schema
By default, most database tools (like pgAdmin or DBeaver) only show you the public schema. The information_schema is a separate, system-level schema.
-
To find it in a GUI: Look for a folder named "Schemas," then "information_schema," and then look under "Views" (not "Tables").
-
To find it via CLI (psql): You can list all views in that specific schema using:
\dv information_schema.*
postgres=# \dv information_schema.*
List of views
Schema | Name | Type | Owner
--------------------+---------------------------------------+------+----------
information_schema | _pg_foreign_data_wrappers | view | postgres
information_schema | _pg_foreign_servers | view | postgres
information_schema | _pg_foreign_table_columns | view | postgres
information_schema | _pg_foreign_tables | view | postgres
information_schema | _pg_user_mappings | view | postgres
information_schema | administrable_role_authorizations | view | postgres
information_schema | applicable_roles | view | postgres
information_schema | attributes | view | postgres
information_schema | character_sets | view | postgres
information_schema | check_constraint_routine_usage | view | postgres
information_schema | check_constraints | view | postgres
information_schema | collation_character_set_applicability | view | postgres
information_schema | collations | view | postgres
information_schema | column_column_usage | view | postgres
information_schema | column_domain_usage | view | postgres
information_schema | column_options | view | postgres
information_schema | column_privileges | view | postgres
information_schema | column_udt_usage | view | postgres
information_schema | columns | view | postgres
information_schema | constraint_column_usage | view | postgres
information_schema | constraint_table_usage | view | postgres
information_schema | data_type_privileges | view | postgres
information_schema | domain_constraints | view | postgres
information_schema | domain_udt_usage | view | postgres
information_schema | domains | view | postgres
information_schema | element_types | view | postgres
information_schema | enabled_roles | view | postgres
information_schema | foreign_data_wrapper_options | view | postgres
information_schema | foreign_data_wrappers | view | postgres
information_schema | foreign_server_options | view | postgres
information_schema | foreign_servers | view | postgres
information_schema | foreign_table_options | view | postgres
information_schema | foreign_tables | view | postgres
information_schema | information_schema_catalog_name | view | postgres
information_schema | key_column_usage | view | postgres
information_schema | parameters | view | postgres
information_schema | referential_constraints | view | postgres
information_schema | role_column_grants | view | postgres
information_schema | role_routine_grants | view | postgres
information_schema | role_table_grants | view | postgres
information_schema | role_udt_grants | view | postgres
information_schema | role_usage_grants | view | postgres
information_schema | routine_column_usage | view | postgres
information_schema | routine_privileges | view | postgres
information_schema | routine_routine_usage | view | postgres
information_schema | routine_sequence_usage | view | postgres
information_schema | routine_table_usage | view | postgres
information_schema | routines | view | postgres
information_schema | schemata | view | postgres
information_schema | sequences | view | postgres
information_schema | table_constraints | view | postgres
information_schema | table_privileges | view | postgres
information_schema | tables | view | postgres
information_schema | transforms | view | postgres
information_schema | triggered_update_columns | view | postgres
information_schema | triggers | view | postgres
information_schema | udt_privileges | view | postgres
information_schema | usage_privileges | view | postgres
information_schema | user_defined_types | view | postgres
information_schema | user_mapping_options | view | postgres
information_schema | user_mappings | view | postgres
information_schema | view_column_usage | view | postgres
information_schema | view_routine_usage | view | postgres
information_schema | view_table_usage | view | postgres
information_schema | views | view | postgres
(65 rows)
How to make pgAdmin show all schemas?
Step-by-Step: Enabling System Objects
-
Open pgAdmin 4.
-
Go to the top menu bar and select File > Preferences.
-
In the left-hand sidebar of the Preferences window, look for the Browser section and click on Nodes.
-
Scroll down the list of checkboxes until you find Show system objects?.
-
Toggle this to True (or check the box).
-
Click Save.
There's no 'Show system objects' or 'System Objects' option for Nodes.
The Updated Path (pgAdmin 4 v6.x and v7.x+)
-
Go to File > Preferences.
-
In the left sidebar, expand Browser and then click on Display.
-
Look for the checkbox labeled Show system objects?.
-
Toggle it to True and click Save.



I found the 'Show system objects' option in Display, enabled it and did the refresh. A new schema pg_toast can be seen besides schema public, but still can't see schema information_schema.
The "Dash" in the Browser Tree
In some versions of pgAdmin 4, the information_schema is tucked away under a specific sub-node rather than being top-level with public.
-
Expand your Database > Schemas.
-
Scroll past
publicandpg_toast. -
If you see a node called Catalog, expand it. In many versions, pgAdmin moves
information_schemaandpg_cataloginside a "Catalog" folder to separate them from user-created schemas.



浙公网安备 33010602011771号