Bug #954: select distinct array

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #954: select distinct array
Date: 2003-04-23 11:45:49
Message-ID: 20030423114549.66AF8475F1B@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

A.Bhuvaneswaran (bhuvansql(at)myrealbox(dot)com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
select distinct array

Long Description
Hi,

Are we unable to select distinct values from an array? If so, how can we select distinct values from an array without using subscripts? Googling didn't help.

regards,
bhuvaneswaran

Sample Code
test_pg=# SELECT version();
version
-------------------------------------------------------------
PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

test_pg=# CREATE TABLE array_test(id int[]);
CREATE TABLE
test_pg=# INSERT INTO array_test VALUES ('{1,3}');
INSERT 4338949 1
test_pg=# INSERT INTO array_test VALUES ('{1,4}');
INSERT 4338950 1
test_pg=# INSERT INTO array_test VALUES ('{1,4}');
INSERT 4338951 1
test_pg=# SELECT distinct id from array_test ;
ERROR: Unable to identify an ordering operator '<' for type 'integer[]'
Use an explicit ordering operator or modify the query
test_pg=#

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Shibashish 2003-04-23 12:00:19 pg_dump Crashes and core dumps
Previous Message hvicha 2003-04-23 06:55:49 Re: Bug #952: real type in WHERE