Re: [GENERAL] I can't drop view?!

Поиск
Список
Период
Сортировка
Искать
От
Adriaan Joubert
Тема
Re: [GENERAL] I can't drop view?!
Дата
Msg-id
36DFC5B4.4174B1F2@albourne.com
Список
Дерево обсуждения
RE: [GENERAL] I can't drop view?! "Colin Price (EML)" <Colin.Price@eml.ericsson.se>
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
В списке pgsql-general по дате отправления
От: Silvio Emanuel Barbosa de Macedo
Дата:
От: Dan Sawyer
Дата:
Сообщение: mpsql question ??
FAQ