views:

142

answers:

1

Why can't one use an output column in the having clause in postgresql? It doesn't change expressivity of the language anyhow, just forces people to rewrite output column definition in having clause. Is a way to avoid that, apart from putting the whole query as a subquery in SELECT * FROM (...) AS t WHERE condition ?

+1  A: 

Bacause it's not implemented? And if you're asking why it wasn't implemented, I see 2 possible explanations:

  • standard doesn't require it
  • nobody had time to spent on it

if you'd like to have it - mail to -hackers, talk about, and then implement.

Frankly I don't see it as a big problem - it's not like you have 1000 characters to retype.

depesz