Skip site navigation (1) Skip section navigation (2)

Re: BUG #1188: evaluation order of select seems to be wrong

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Holger Jakobs <holger(at)jakobs(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1188: evaluation order of select seems to be wrong
Date: 2004-07-07 16:44:44
Message-ID: 20040707094054.U54061@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: 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.


In response to

Responses

pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-07-07 17:15:23
Subject: BUG #1189: unbounded string copy in postmaster
Previous:From: Peter EisentrautDate: 2004-07-07 16:03:20
Subject: Re: BUG #1188: evaluation order of select seems to be wrong

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group