Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to check dependency of table in postgresql?



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

Post New Answer

More Postgre Interview Questions

What command do you type to exit the postgresql console application?

1 Answers  


Are foreign key constraints necessary?

1 Answers  


What is the difference between sql and postgresql?

1 Answers  


What is toast in postgres?

1 Answers  


Is postgresql the same as mysql?

1 Answers  


What are the different data types supported by PostgreSQL?

1 Answers  


What is special about postgresql?

1 Answers  


What is a primary key constraint?

1 Answers  


What is the port 5432?

1 Answers  


What are the types of stored procedures?

1 Answers  


What is function and stored procedure?

1 Answers  


What is tableplus?

1 Answers  


Categories