Re: calculated fields are not seen in the WHERE clause

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Yaroslav Dmitriev <yar(at)warlock(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: calculated fields are not seen in the WHERE clause
Date: 2002-10-30 12:03:25
Message-ID: 1035979405.3843.23.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yaroslav Dmitriev kirjutas K, 30.10.2002 kell 13:48:
> Hello,
>
> OK
> select 1 as ccc where 1=1
>
> ERROR
> select 1 as ccc where ccc=1
> PostgreSQL said: ERROR: Attribute 'ccc' not found
>
> Is there any way to set conditions on calculated fields values?

You could try using a subquery

select *
from
(select 1 as ccc) sub
where ccc=1

---------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Gribble 2002-10-30 14:24:28 Re: Database replication... - Mission Critical DBMS's --
Previous Message Yaroslav Dmitriev 2002-10-30 11:48:19 calculated fields are not seen in the WHERE clause