PostgreSQL: find user type information

Where is custom type information stored?

Are there tables containing information about user-defined composite type fields, their names, etc.?

+4
source share
2 answers

The pg_type directory stores data type information. Base types and enumeration types (scalar types) are created using CREATE TYPE and domains with CREATE DOMAIN.

Additional information on pg_type plz visit http://www.postgresql.org/docs/9.0/static/catalog-pg-type.html

+2
source

Information about the fields that make up the composite type can be retrieved as follows:

select * from pg_attribute where attrelid = (select typrelid from pg_type where typname = 't_employee') 

where t_employee is the name of the composite type.

+1
source

All Articles