Re: BUG #1188: evaluation order of select seems to be wrong - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: BUG #1188: evaluation order of select seems to be wrong
Date
Msg-id 20040707094054.U54061@megazone.bigpanda.com
Whole thread Raw
In response to Re: BUG #1188: evaluation order of select seems to be wrong  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: BUG #1188: evaluation order of select seems to be wrong
List pgsql-bugs
On Wed, 7 Jul 2004, Peter Eisentraut wrote:

> Am Mittwoch, 7. Juli 2004 14:58 schrieb PostgreSQL Bugs List:
> > Description:        evaluation order of select seems to be wrong
>
> Please read this:
> http://www.postgresql.org/docs/7.4/static/sql-expressions.html#SYNTAX-EXPRESS-EVAL

The issue is that from what he said the standard may mandate that HAVING
is applied before the select list is evaluated because it's part of the
table expression.  In that case, the statement he gave would be required
to work because the select list would be evaluated on the output of the
table expression that's already had the having clause filter out the bad
rows.  This is different from the case where both are in where conditions.

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG #1188: evaluation order of select seems to be wrong
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1189: unbounded string copy in postmaster