correlated query as a column and where clause

From: salah jubeh <s_jubeh(at)yahoo(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: correlated query as a column and where clause
Date: 2011-04-15 15:22:19
Message-ID: 376043.62368.qm@web161514.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All,

I am wondering, why I can not add the following ' A > 10' in the where
clause i.e. 'where nspname !~* 'pg_' and A > 10'

Select nspname, (SELECT count(*) as count FROM pg_tables where schemaname =
nspname) as A

FROM pg_namespace
where nspname !~* 'pg_'

Thanks in advance

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harald Armin Massa 2011-04-15 15:26:45 Re: correlated query as a column and where clause
Previous Message Adrian Klaver 2011-04-15 14:23:38 Re: Migrating Data Across Major Versions