How to check dependency of table in postgresql?
Answer / Nitesh Ranjan
To check the dependency of a table in PostgreSQL, you can use the pg_depend catalog view. Here's an example query: n`SELECT n.nspname AS schema, c.relname AS table_name, d.def FROM pg_class c JOIN pg_attribute a ON c.oid = a.attrelid JOIN pg_namespace n ON c.relnamespace = n.oid JOIN pg_depend d ON a.attnum = ANY(d.objid) WHERE c.relkind = 'r' AND d.classid = c.oid AND n.nspname NOT IN ('pg_catalog', 'information_schema');`
| Is This Answer Correct ? | 0 Yes | 0 No |
What command do you type to exit the postgresql console application?
Are foreign key constraints necessary?
What is the difference between sql and postgresql?
What is toast in postgres?
Is postgresql the same as mysql?
What are the different data types supported by PostgreSQL?
What is special about postgresql?
What is a primary key constraint?
What is the port 5432?
What are the types of stored procedures?
What is function and stored procedure?
What is tableplus?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)