Search Postgresql Archives

Re: Bug? Changing where distinct occurs produces error?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 7 Jul 2006, Michael Loftis wrote:

> OK I'm either insane or found a bug in 8.1.3
>
> If you execute say:
>
> SELECT DISTINCT(ua.user_id),pa.poll_id FROM user_answers ua, poll_answers
> pa WHERE pa.poll_answer_id = ua.poll_answer_id AND ua.active='Y';
>
> Everything is fine, however if you run
>
> SELECT pa.poll_id,DISTINCT(ua.user_id) FROM user_answers ua, poll_answers
> pa WHERE pa.poll_answer_id = ua.poll_answer_id AND ua.active='Y';

This statement is invalid. DISTINCT is a set quantifier and either comes
before the select list or as the first thing in a set function
specification.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux