Hi Colin,
I get the same result as you when trying to create the view the same
way you do.
The following looks as if it may work:
create view v_usertype as
select
usertype.description as usertypedescription,
useraccount.login as login
from usertype a, useraccount b
where usertype.id = useraccount.usertypeid
and b.rowstatusid = 0;
as this gives
test=> select * from pg_views where viewname like 'v_usertype';
viewname
|viewowner|definition
----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
v_usertype|adriaan |SELECT "description" AS "usertypedescription",
"login" FROM "useraccount" "b", "usertype", "useraccount" WHERE ("id" =
"usertypeid") AND ("b"."rowstatusid" = '0'::"int4");
(1 row)
and rowstatusid is now properly qualified with b.
Hope it works for you,
Adriaan