Chinaunix

标题: 我怎么没有arry_upper,array_lower函数? [打印本页]

作者: Aray_CN    时间: 2005-03-31 21:23
标题: 我怎么没有arry_upper,array_lower函数?
  

文档中说:
array_dims 生成一个 text 结果, 对于人类可能比较容易阅读,但是对于程序可能就不那么方便了。 我们也可以用 array_upper 和 array_lower 函数检索,它们分别返回指定数组维的上界和下界。


eim=# select array_dims ( choices ) from eim_columns;
array_dims
------------
[1]
(1 行)

eim=# select array_upper ( choices ) from eim_columns;
ERROR:  function array_upper(character varying[]) does not exist
提示:  No function matches the given name and argument types. You may need to ad
d explicit type casts.
eim=# select array_lower ( choices ) from eim_columns;
ERROR:  function array_lower(character varying[]) does not exist
提示:  No function matches the given name and argument types. You may need to ad
d explicit type casts.
作者: Aray_CN    时间: 2005-03-31 21:46
标题: 我怎么没有arry_upper,array_lower函数?
select array_upper ( ARRAY[1,2,3] || ARRAY[[4,5,6],[7,8,9],[7,8,9],[7,8,9],[7,8,9] ] ,1 )

array_upper array_lower有2个参数,如下,其中anyarray是一个数组字段,integer是用来指定数组的维数

array_lower (anyarray, integer)  
array_upper (anyarray, integer)




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2