array_length()函数中的第二个参数是什么? [英] What is the second argument in array_length() function?

查看:974
本文介绍了array_length()函数中的第二个参数是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Postgresql 9.4具有功能用于数组。其中之一是 array_length(anyarray,int)。它得到两个argumetns。

Postgresql 9.4 has functions for array. One of them is array_length(anyarray, int). It get two argumetns.

第二个参数是什么?在所有示例中,其值为 1

What is the second argument? In all examples it has value 1. But nowhere says what it is.

推荐答案

那是数组的维度

考虑一个2D数组3×2的示例:

Consider an example with a 2D array 3×2:

array_length(array[[1, 2], [3, 4], [5, 6]], 1) ---> 3
array_length(array[[1, 2], [3, 4], [5, 6]], 2) ---> 2

第一维的大小为3;第二维的大小为2。

The size of the first dimension is 3; the size of the second dimension is 2.

这篇关于array_length()函数中的第二个参数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆