我想显示任何表达式类型名称.像python中的'type'函数.
有点像这样工作:
select type(1);
'int'
select type(ROW(1, 'abc'));
'row(int, text)'
select type(select * from t1);
'setof t1'
Run Code Online (Sandbox Code Playgroud)
在postgresql中有这样的东西吗?
我想从矩阵中选择不同数量的第一个元素.数字在数组中指定.结果是一维数组.例如:
a = np.arange(25).reshape([5, 5])
numbers = np.array([3, 2, 0, 1, 2])
Run Code Online (Sandbox Code Playgroud)
我想要这个结果:
[0, 1, 2, 5, 6, 15, 20, 21]
Run Code Online (Sandbox Code Playgroud)
没有for循环.