Difference between revisions of "Pg tables"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
* <code>[[\dt]]</code>
 
* <code>[[\dt]]</code>
* <code>SELECT * FROM pg_catalog.[[pg_tables]];</code>
+
* <code>[[SELECT * FROM pg_catalog.pg_tables;]]</code>
  
 
  select tablename,  
 
  select tablename,  
Line 18: Line 18:
 
* [[PG_TABLE_DEF]]
 
* [[PG_TABLE_DEF]]
 
* [[SORTKEY]]
 
* [[SORTKEY]]
 +
* <code>[[pg_database_size]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 22:33, 6 June 2022

SELECT tablename AS TABLE FROM pg_tables WHERE schemaname = 'public';
select tablename, 
  HAS_TABLE_PRIVILEGE(tablename, 'select') as select,
  HAS_TABLE_PRIVILEGE(tablename, 'insert') as insert,
  HAS_TABLE_PRIVILEGE(tablename, 'update') as update,
  HAS_TABLE_PRIVILEGE(tablename, 'delete') as delete, 
  HAS_TABLE_PRIVILEGE(tablename, 'references') as references 
from pg_tables where schemaname='public' order by tablename;

Related[edit]

See also[edit]

Advertising: