小编GVK*_*GVK的帖子

eliminate duplicate array values in postgres

I have an array of type bigint, how can I remove the duplicate values in that array?

Ex: array[1234, 5343, 6353, 1234, 1234]

I should get array[1234, 5343, 6353, ...]

I tested out the example SELECT uniq(sort('{1,2,3,2,1}'::int[])) in the postgres manual but it is not working.

postgresql

69
推荐指数
7
解决办法
6万
查看次数

标签 统计

postgresql ×1