PostgreSQL 8.1 婺桺桺懼PostgreSQL 婺啘 彽嘩 | ||||
---|---|---|---|---|
Prev | Fast Backward | Chapter 31. 媇敇昇嚟 | Fast Forward | Next |
蓖商 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_catalog | sql_identifier | 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇欔婘䔇昄扞康劉䓄攂滇嘷嬉昄扞康 |
object_schema | sql_identifier | 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇欔婘䔇昇嚟劉 |
object_name | sql_identifier | 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇䔇劉庖 |
object_type | character_data | 嘪䫘庖赆柟誄䔇昄䂇䔇凹茇䔇䌂傋TABLE 昄䂇赆臖臘䔇婔婻庖枕嘪䫘DOMAIN 昄䂇赆認婻嘘嘪䫘ROUTINE昄䂇赆 臖庘昄䔇婔婻埗昄潡蔙誫啂昄扞䌂傋嘪䫘幋婔㔗 |
array_type_identifier | sql_identifier | 赆柟誄䔇昄䂇䔇昄扞䌂傋柟誄严湺臖严㔗䫘認婻启噽垄媇敇昇嚟 蓖商䔇 dtd_identifier 庖枕誂毖㔗 |
data_type | character_data | 套悩認滇婔婻喙䘞䔇䌂傋昄扞噄䘹䔇昄扞䌂傋劥彍儌滇 USER-DEFINED認䓉愙喕婋䌂傋婘 udt_name 启䕩噿䔇庖枕婺湺庺㔗 |
character_maximum_length | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
character_octet_length | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
character_set_catalog | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
character_set_schema | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
character_set_name | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
collation_catalog | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
collation_schema | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
collation_name | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
numeric_precision | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
numeric_precision_radix | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
numeric_scale | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
datetime_precision | cardinal_number | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
interval_type | character_data | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
interval_precision | character_data | 攂滇䷺啹婺認婻媇敇幽婉锗䫘庯PostgreSQL 麯䔇昄䂇噄䘹昄扞䌂傋 |
domain_default | character_data | 儔橻垂䯄 |
udt_catalog | sql_identifier | 噄䘹䔇昄扞䌂傋垔幬欔婘䔇昄扞康劉庖攂滇嘷嬉昄扞康 |
udt_schema | sql_identifier | 噄䘹垔幬欔婘䔇昇嚟劉庖 |
udt_name | sql_identifier | 噄䘹䔇昄扞䌂傋劉庖 |
scope_catalog | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
scope_schema | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
scope_name | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
maximum_cardinality | cardinal_number | 攂滇婺䷺啹婺PostgreSQL 麯昄䂇攂滇橬方鍊䔇䂘昄 |
dtd_identifier | sql_identifier | 噄䘹䔇昄扞䌂傋柟誄严䔇湺臖严㔗認婻䕞嬉澇橬䫘崇㔗 |