查看Greenplum集群中的创建的类型

查看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"));

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

盒马coding

你的支持是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值