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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest version of postgresql?

946