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

Re: WHERE on an alias

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: WHERE on an alias
Date: 2001-08-24 20:52:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Fri, 24 Aug 2001, Joseph Shraibman wrote:

> That was just an example.  My code doesn't use group by, it uses a subselect.  And I 
> checked and having doesn't work with aliases either.

Okay.  I know why WHERE doesn't support aliases, but was a little confused
by the example.  The reason for that is that the select list isn't
worked out until after the rows are qualified and it technically fits

I think it might fall into something like (untested):
 select * from (select a, (...) as subsel from taba) as foo
  where foo.subsel>5;
to fit standard, but that's pretty ugly...

In response to

pgsql-sql by date

Next:From: Tom LaneDate: 2001-08-24 20:56:44
Subject: Re: WHERE on an alias
Previous:From: Josh BerkusDate: 2001-08-24 20:43:21
Subject: Re: WHERE on an alias

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