Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データベースで継承された列のリストを取得したいと思います。これを見つけるために使用できるクエリはありますか?
PostgreSql 8.3 を使用しています
これを行う簡単なクエリを次に示します。
select relname as table_name, attname as column_name from pg_class join pg_inherits on pg_class.oid = pg_inherits.inhrelid join pg_attribute on pg_inherits.inhparent = attrelid where attnum > 0;