Difference between revisions of "PostgreSQL: \dt"
Jump to navigation
Jump to search
↑ https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546
↑ https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546
Line 19: | Line 19: | ||
== Related == | == Related == | ||
+ | * <code>[[SELECT * FROM information_schema.tables;]]</code> | ||
* {{TOC operation databases}} | * {{TOC operation databases}} | ||
Revision as of 09:27, 29 October 2021
https://www.postgresql.org/docs/current/app-psql.html
\dt
List of relations Schema | Name | Type | Owner --------+-----------------------------------+-------+------------------- public | yourtable1 | table | rds_master public | yourtable2 | table | rds_master public | yourtable3 | table | other_user public | yourtable4 | table | rds_master
\dt *.*: List tables from all schemas (if *.* is omitted will only show SEARCH_PATH ones) [1]
\dE[S+]: List all foreign tables [2]
Related
SELECT * FROM information_schema.tables;
- Connect to a database
- Show databases
- Create database
- Delete database
- Create user
- List users
- List databases
- List tables:
show tables
- GRANT
See also
- PostgreSQL:
psql
,.psqlrc, .pgpass
,$HOME/.pg service.conf
,-U, -W, -d
, meta-commands:\du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
,show users
,show
,su - postgres
,psql -c, \?, \connect, \conninfo
,--version, --help
, PL/pgSQL - SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
Advertising: