Re: [HACKERS] distinct. Is this the correct behaviour?

From: "Damond Walker" <dwalker(at)black-oak(dot)com>
To: <owner-pgsql-hackers(at)postgreSQL(dot)org>
Cc: <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] distinct. Is this the correct behaviour?
Date: 1999-10-21 16:57:16
Message-ID: 00ef01bf1be5$567e4600$af63a8c0@walkers.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

----- Original Message -----
> Hmph, so sybase hasn't thought through the implications of ORDER BY on
> a hidden column vs. DISTINCT either. Can anyone try it on some other
> DBMSes?
>

Using the following script...

create table t1(f1 int, f2 int);
insert into t1(f1, f2) values(1,1);
insert into t1(f1, f2) values(1,2);
insert into t1(f1, f2) values(1,3);
insert into t1(f1, f2) values(2,4);
select distinct f1 from t1 order by f2;

Returned the following message under Oracle8 on NT:
ORA-01791: not a SELECTed expression

Returned the following message under MS SQL Server 7.0:
ORDER BY items must appear in the select list if SELECT DISTINCT is
specified.

I could try it on Oracle8i but I suspect the result will be the same.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-10-21 16:58:32 Re: [HACKERS] distinct. Is this the correct behaviour?
Previous Message Bruce Momjian 1999-10-21 16:55:56 Re: [DOCS] Re: [HACKERS] Outline for PostgreSQL book