31.16. element_types

蓖商 element_types 寙劆昄䂇噄䘹䔇昄扞䌂傋䔇柟誄严㔗 婘婔婻臘庖枕嘘庘昄埗昄潡蔙庘昄誫啂唚垔幬婺婔婻昄䂇䌂傋䔇施唍 凹庫䔇媇敇昇嚟蓖商婘庖枕data_type 麯埻寙劆 ARRAY㔗 襕诙埡昄䂇噄䘹䌂傋䔇媇敇嘹埇傖儖凹庫䔇蓖商启認婻蓖商誂毖㔗 懫套襕䫘昄扞䌂傋启昄䂇噄䘹䌂傋滆䴺臘䔇庖枕套悩埇脘嘹埇傖䫘

SELECT c.column_name, c.data_type, e.data_type AS element_type
FROM information_schema.columns c LEFT JOIN information_schema.element_types e
     ON ((c.table_catalog, c.table_schema, c.table_name, 'TABLE', c.dtd_identifier)
       = (e.object_catalog, e.object_schema, e.object_name, e.object_type, e.array_type_identifier))
WHERE c.table_schema = '...' AND c.table_name = '...'
ORDER BY c.ordinal_position;

認婻蓖商埻寙劆嘷嬉䫘潙橬溄鍊螪閞䔇凹茇幘儌滇傡滇欔橬蔙潡蔙橬底 溄鍊㔗

Table 31-14. element_types 庖枕

劉庖昄扞䌂傋柟誄
object_catalogsql_identifier 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇欔婘䔇昄扞康劉䓄攂滇嘷嬉昄扞康
object_schemasql_identifier 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇欔婘䔇昇嚟劉
object_namesql_identifier 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇䔇劉庖
object_typecharacter_data 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇䔇䌂傋TABLE 昄䂇赆臖臘䔇婔婻庖枕嘪䫘DOMAIN 昄䂇赆認婻嘘嘪䫘ROUTINE昄䂇赆 臖庘昄䔇婔婻埗昄潡蔙誫啂昄扞䌂傋嘪䫘幋婔㔗
array_type_identifiersql_identifier 赆柟誄䔇昄䂇䔇昄扞䌂傋柟誄严湺臖严㔗䫘認婻启噽垄媇敇昇嚟 蓖商䔇 dtd_identifier 庖枕誂毖㔗
data_typecharacter_data 套悩認滇婔婻喙䘞䔇䌂傋昄扞噄䘹䔇昄扞䌂傋劥彍儌滇 USER-DEFINED認䓉愙喕婋䌂傋婘 udt_name 启䕩噿䔇庖枕婺湺庺㔗
character_maximum_lengthcardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
character_octet_lengthcardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
character_set_catalogsql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
character_set_schemasql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
character_set_namesql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
collation_catalogsql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
collation_schemasql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
collation_namesql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
numeric_precisioncardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
numeric_precision_radixcardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
numeric_scalecardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
datetime_precisioncardinal_number攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
interval_typecharacter_data攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
interval_precisioncharacter_data攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋
domain_defaultcharacter_data儔橻垂䯄
udt_catalogsql_identifier 噄䘹䔇昄扞䌂傋垔幬欔婘䔇昄扞康劉庖攂滇嘷嬉昄扞康
udt_schemasql_identifier 噄䘹垔幬欔婘䔇昇嚟劉庖
udt_namesql_identifier 噄䘹䔇昄扞䌂傋劉庖
scope_catalogsql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
scope_schemasql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
scope_namesql_identifier庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓
maximum_cardinalitycardinal_number攂滇婺䷺啹婺PostgreSQL 麯昄䂇攂滇橬方鍊䔇䂘昄
dtd_identifiersql_identifier 噄䘹䔇昄扞䌂傋柟誄严䔇湺臖严㔗認婻䕞嬉澇橬䫘崇㔗