Re: Aliased SubSelect in HAVING clause bug -- in progress? - Mailing list pgsql-bugs

From Josh Berkus
Subject Re: Aliased SubSelect in HAVING clause bug -- in progress?
Date
Msg-id 200303120854.58407.josh@agliodbs.com
Whole thread Raw
In response to Re: Aliased SubSelect in HAVING clause bug -- in progress?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Aliased SubSelect in HAVING clause bug -- in progress?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom,

> No, because it's not a bug.  The SELECT list is evaluated after HAVING,
> so what you are asking for is an impossibility in the SQL semantic
> model.
>=20
> (Yeah, I know there's some laxity in GROUP BY ... one of our worse
> mistakes IMHO ...)

Oh.  I see what you mean.   Given that I (along with at least a dozen poste=
rs=20
to the SQL list) was confused that our HAVING/ORDER BY will accept column=
=20
aliases but not sub-select aliases, would this be worthy of a FAQ item?


--=20
-Josh Berkus
 Aglio Database Solutions
 San Francisco

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: op error no question, but no error warning
Next
From: Tom Lane
Date:
Subject: Re: Aliased SubSelect in HAVING clause bug -- in progress?