查看Greenplum集群中的创建的类型
SELECT (current_database())::information_schema.sql_identifier AS udt_catalog, (nc.nspname)::information_schema.sql_identifier AS udt_schema, (c.relname)::information_schema.sql_identifier AS udt_name, (a.attname)::information_schema.sql_identifier AS attribute_name, (a.attnum)::information_schema.cardinal_number AS ordinal_position, (pg_get_expr(ad.adbin, ad.adrelid))::information_schema.character_data AS attribute_default, (CASE WHEN (a.attnotnull OR ((t.typtype = 'd'::"char") AND t.typnotnull)) THEN 'NO'::text ELSE 'YES'::text END)::information_schema.character_data AS is_nullable, (CASE WHEN ((t.typelem <> (0)::oid) AND (t.typlen = (-1))) THEN 'ARRAY'::text WHEN (nt.nspname = 'pg_catalog'::name) THEN format_type(a.atttypid, NULL::integer) ELSE 'USER-DEFINED'::text END)::information_schema.character_data AS data_type, (information_schema._pg_char_max_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_maximum_length, (information_schema._pg_char_octet_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_octet_length, (NULL::character varying)::information_schema.sql_identifier AS character_set_catalog, (NULL::character varying)::information_schema.sql_identifier AS character_set_schema, (NULL::character varying)::information_schema.sql_identifier AS character_set_name, (NULL::character varying)::information_schema.sql_identifier AS collation_catalog, (NULL::character varying)::information_schema.sql_identifier AS collation_schema, (NULL::character varying)::information_schema.sql_identifier AS collation_name, (information_schema._pg_numeric_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision, (information_schema._pg_numeric_precision_radix(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision_radix, (information_schema._pg_numeric_scale(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_scale, (information_schema._pg_datetime_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS datetime_precision, (NULL::character varying)::information_schema.character_data AS interval_type, (NULL::character varying)::information_schema.character_data AS interval_precision, (current_database())::information_schema.sql_identifier AS attribute_udt_catalog, (nt.nspname)::information_schema.sql_identifier AS attribute_udt_schema, (t.typname)::information_schema.sql_identifier AS attribute_udt_name, (NULL::character varying)::information_schema.sql_identifier AS scope_catalog, (NULL::character varying)::information_schema.sql_identifier AS scope_schema, (NULL::character varying)::information_schema.sql_identifier AS scope_name, (NULL::integer)::information_schema.cardinal_number AS maximum_cardinality, (a.attnum)::information_schema.sql_identifier AS dtd_identifier, ('NO'::character varying)::information_schema.character_data AS is_derived_reference_attribute FROM (pg_attribute a LEFT JOIN pg_attrdef ad ON (((a.attrelid = ad.adrelid) AND (a.attnum = ad.adnum)))), pg_class c, pg_namespace nc, (pg_type t JOIN pg_namespace nt ON ((t.typnamespace = nt.oid))) WHERE ((((((a.attrelid = c.oid) AND (a.atttypid = t.oid)) AND (nc.oid = c.relnamespace)) AND (a.attnum > 0)) AND (NOT a.attisdropped)) AND (c.relkind = 'c'::"char"));