Re: leaky views, yet again

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: leaky views, yet again
Дата
Msg-id 4CAB1ABA0200002500036539@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: leaky views, yet again  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:
> What is the use case for the status quo?
Much simplified:

create table party
( countyno smallint not null, caseno varchar(14) not null, partyno smallint not null, name text not null, address text,
isaddrsealedboolean not null, primary key (countyno, caseno, partyno)
 
);

create table sealedaddrauth
( userid text not null primary key
);

create view partyview as select countyno, caseno, partyno,   case     when isaddrsealed and not exists      (select *
fromsealedaddrauth       where userid = current_user)     then '*** SEALED ***'     else address   end as address,
isaddrsealedfrom party
 
;

insert into party values (1,'2010FA000123',1,'Jane Doe',
'123 Victim Ave., Anytown, WI 53599',true);
insert into party values (1,'2010FA000123',2,'John Doe',
'123 Stalker St., Hometown, WI 53666',false);
-- Kevin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: standby registration (was: is sync rep stalled?)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: leaky views, yet again