
In the first example, the Postgres database contained no tables to return an empty set. In the above example, we first connected to the default database, i.e., Postgres database connecting to this database will only display the connected databases’ tables. The below example shows that we need to connect to the specified database to show the database’s table. It must be present on the database server to show a table from the specified database. First is the schema name from which we have shown tables, the second * is defined as to show all tables from the specified schema.īelow is the working of the show table in PostgreSQL. *: This is defined as to show all tables from the specified schema.\dt *.*: This is used when we want to show all the schema tables first, * define as all schema and second, will define as all tables.This contains information like table name, schema name, etc. Pg_tables: This table is a system table that contains the information related to all tables.Pg_catalog: This schema uses the table name as pg_tables, a catalog schema in PostgreSQL.Select: Select operations are used when we show tables from the catalog schema using pg_tables.We can use any schema name to show all tables from the schema. Schema name: We define it to show all tables from the specified schema.\dt+: This command is used to show all table descriptive output from the connected database.\dt: This command is used to show all tables from the connected database.We can use any database name to show all tables from the database. Database name: This is defined as the database name used to connect to the database to show all tables from a connected database using the \dt command.Show all schema tables SELECT *(Show all rows from pg_tables) FROM pg_catalog.pg_tables īelow is the parameter description syntax of show tables in PostgreSQL

OR \dt+ shema_name.* (Show descriptive output of show tables)ģ. Show specific schema tables \dt shema_name.* \dt+ (Show descriptive output of show tables)Ģ.
