Re: [HACKERS] DISTINCT and ORDER BY bug?
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] DISTINCT and ORDER BY bug? |
| Дата | |
| Msg-id | 13920.949905403@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] DISTINCT and ORDER BY bug? (Don Baccus <dhogaza@pacifier.com>) |
| Ответы |
Re: [HACKERS] DISTINCT and ORDER BY bug?
|
| Список | pgsql-hackers |
Don Baccus <dhogaza@pacifier.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
В списке pgsql-hackers по дате отправления: