PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔䆹9. 庘昄启淉嘩严媆誕嬉誕

9.14. 昄䂇庘昄启淉嘩严

臘9-35滆䴺庖埇傖䫘庯 array 䌂傋䔇淉嘩严㔗

臘9-35. array 淉嘩严

淉嘩严柟誄冋床䂷悩
=京庯ARRAY[1.1,2.1,3.1]::int[] = ARRAY[1,2,3]t
<>婉京庯ARRAY[1,2,3] <> ARRAY[1,2,4]t
<償庯ARRAY[1,2,3] < ARRAY[1,2,4]t
>崓庯ARRAY[1,4,3] > ARRAY[1,2,4]t
<=償庯潡京庯ARRAY[1,2,3] <= ARRAY[1,2,3]t
>=崓庯潡京庯ARRAY[1,4,3] >= ARRAY[1,4,3]t
@>寙劆ARRAY[1,4,3] @> ARRAY[3,1]t
<@赆寙劆庯ARRAY[2,7] <@ ARRAY[1,7,4,2,6]t
&&麉培(橬噌劯噄䘹)ARRAY[1,4,3] && ARRAY[2,1]t
||昄䂇婯昄䂇誂毖ARRAY[1,2,3] || ARRAY[4,5,6]{1,2,3,4,5,6}
||昄䂇婯昄䂇誂毖ARRAY[1,2,3] || ARRAY[[4,5,6],[7,8,9]]{{1,2,3},{4,5,6},{7,8,9}}
||噄䘹婯昄䂇誂毖3 || ARRAY[4,5,6]{3,4,5,6}
||昄䂇婯噄䘹誂毖ARRAY[4,5,6] || 7{4,5,6,7}

昄䂇懫膄滇嘪䫘邻螴䔇 B-Tree 懫膄庘昄凹欔橬噄䘹锊婔誕臯懫膄䔇㔗崔䂘昄䂇䔇噄䘹毬䙓臯釺废誕臯螪閞(橔劯䔇婋湺埻寡橔媆)㔗套悩婴婻昄䂇䔇喙垹䕩劯嘖䂘昄婉京闼幽喿垔毐废釺废䔇饡襕啹䘹儖滇䂘昄(寘桺the first difference in the dimensionality information determines the sort order)認婯 PostgreSQL 8.2 幋嬉䔇䬽橸婉劯蔕䬽橸螴婺喙垹䕩劯䔇婴婻昄䂇䕩京剿嘪垄傸䔇䂘昄潡婋湺评啘幽婉䕩劯㔗

埗黙誗8.10诙埡橬噿昄䂇淉嘩严臯婺䔇敘崔䂖誗㔗

臘9-36滆䴺庖埇傖䫘庯昄䂇䌂傋䔇庘昄㔗埗黙誗8.10诙埡敘崔媇敇傖埪嘪䫘認底庘昄䔇冋床㔗

臘9-36. array 庘昄

庘昄誫啂䌂傋柟誄冋床䂷悩
array_append(anyarray, anyelement) anyarray劏昄䂇橆儆時媹噄䘹array_append(ARRAY[1,2], 3){1,2,3}
array_cat(anyarray, anyarray) anyarray誂毖婴婻昄䂇array_cat(ARRAY[1,2,3], ARRAY[4,5]){1,2,3,4,5}
array_dims(anyarray) text誫啂昄䂇䂘昄䔇桺橸臘䴺array_dims(ARRAY[[1,2,3], [4,5,6]])[1:2][1:3]
array_lower(anyarray, int) int誫啂昄䂇䂘昄䔇婋䘯array_lower('[0:2]={1,2,3}'::int[], 1)0
array_prepend(anyelement, anyarray) anyarray劏昄䂇嚔崘時媹噄䘹array_prepend(1, ARRAY[2,3]){1,2,3}
array_to_string(anyarray, text) text嘪䫘彖锫严儖昄䂇噄䘹誂毖婺庖严婾array_to_string(ARRAY[1, 2, 3], '~^~')1~^~2~^~3
array_upper(anyarray, int) int誫啂昄䂇䂘昄䔇婪䘯array_upper(ARRAY[1,2,3,4], 1)4
string_to_array(text, text) text[]嘪䫘毺垔䔇彖锫严檪庖严婾彖輗潊昄䂇噄䘹string_to_array('xx~^~yy~^~zz', '~^~'){xx,yy,zz}

劯锔饡釕嬉誕
溇傽臘膆嚟婪婔亓蕔镖庘昄