Konstantin Izmailov <pgfizm@xxxxxxxxx> writes: > I was unable to find how to get column names, sizes and types for a given > composite type. For a composite type, pg_type.typrelid links to pg_class and pg_attribute entries that work much like a table. For instance, # select a.attname, a.atttypid::regtype from pg_type t left join pg_attribute a on t.typrelid = a.attrelid where typname = 'complex' order by attnum; attname | atttypid ---------+------------------ r | double precision i | double precision (2 rows) regards, tom lane