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 |
How do I set up pgadmin?
What is the option that can be used in PostgreSQL to make transactions see rows affected in previous parts of the transaction?
What is the port number for postgresql?
How to display error message in postgresql?
How to get the ddl of a table in postgresql?
How many rows can postgresql handle?
How do I start postgresql on linux?
Does google use postgresql?
Where is pg_hba conf?
Explain the history of postgresql.
Provide an explanation about write ahead logging?
How many rows can postgres handle?
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)