Re: 7.4 aggregate OR TRUE yields strange results - Mailing list pgsql-bugs

From Tom Lane
Subject Re: 7.4 aggregate OR TRUE yields strange results
Date
Msg-id 4786.1076709773@sss.pgh.pa.us
Whole thread Raw
In response to 7.4 aggregate OR TRUE yields strange results  ("SZŰCS Gábor" <surrano@mailbox.hu>)
List pgsql-bugs
"SZŰCS Gábor" <surrano@mailbox.hu> writes:
> SELECT count(*)<0 OR TRUE FROM mytable WHERE condition
> dumps the whole tuples meeting the condition.

Wow, that's bizarre.  The "x OR TRUE" expression will get simplified to
just TRUE, so that COUNT isn't really there at all, but that shouldn't
change the query semantics.  And it seems to work correctly in 7.3.*
and before.  Looking into it ...
        regards, tom lane


pgsql-bugs by date:

Previous
From: "SZŰCS Gábor"
Date:
Subject: 7.4 aggregate OR TRUE yields strange results
Next
From: Tom Lane
Date:
Subject: Re: 7.4 aggregate OR TRUE yields strange results