Re: [HACKERS] calculated fields are not seen in the WHERE clause

2002-11-01 Thread Bruce Momjian
AS strings are labels, not columns that can be referenced in a where clause: test=> select lanname as xx from pg_language where xx = 'yy'; Hannu is correct that making a FROM entry works. --- Hannu Krosing wrote: >

Re: [HACKERS] calculated fields are not seen in the WHERE clause

2002-10-30 Thread Hannu Krosing
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