From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Don Baccus <dhogaza(at)pacifier(dot)com> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] DISTINCT and ORDER BY bug? |
Date: | 2000-02-07 06:36:43 |
Message-ID: | 13920.949905403@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Don Baccus <dhogaza(at)pacifier(dot)com> writes:
> At 12:26 AM 2/7/00 -0500, Tom Lane wrote:
>> It would be interesting to poke at Oracle to find out just what they
>> consider a legitimate ORDER BY expression for a SELECT DISTINCT.
> I have full-time access to an Oracle installation, so fire away
> regarding examples and questions.
Well, try these on for size:
select distinct x from foo order by x+1;
select distinct x+1 from foo order by x+1;
select distinct x+1 from foo order by x;
select distinct x+1 from foo order by x+2;
select distinct x+y from foo order by x+y;
select distinct x,y from foo order by x+y;
select distinct x+y from foo order by x,y;
select distinct x+y from foo order by x-y;
A human can easily see that all but the last two are well-defined,
but I'll be a little surprised if Oracle knows it...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Timothy Dyck | 2000-02-07 06:41:26 | follow-up on PC Week Labs benchmark results |
Previous Message | Don Baccus | 2000-02-07 06:17:17 | Re: [HACKERS] DISTINCT and ORDER BY bug? |