Re: subtable <-> bigtable

Поиск
Список
Период
Сортировка
От Peter Pilsl
Тема Re: subtable <-> bigtable
Дата
Msg-id 20011216122228.C12713@i3.atat.at
обсуждение исходный текст
Ответ на Re: subtable <-> bigtable  ("Andrew G. Hammond" <drew@xyzzy.dhs.org>)
Список pgsql-general
This seems to be the one I was looking for !

I only have some concerns about security, cause I must give full
access to the users to the maintable to allow all the rules be
performed: insert, update, delete anyway and also select cause the
update-command would fail otherwise (see below).
 So noone prevents my user to open the maintable via odcb and
ms-access (which is the way they connect) and mess it up - especially
mess up parts that are dedicated to other users.

thnx,
peter

ps: t is the table and t_v1 is the view.

\dp
 t                     | {"=","peter=arwR","test2=aw"}
 t_v1                  | {"=","peter=arwR","test2=arwR"}

\d t
           Table "t"
 Attribute |  Type   | Modifier
-----------+---------+----------
 num       | integer |
 rank      | integer |
 x         | integer |

CREATE RULE update_t_v1 as on update to t_v1 do instead update t set num = new.num, rank=new.rank,x=new.x where
num=old.num; 

UPDATE t_v1 set num=10 where num=11;
ERROR:  t: Permission denied.



On Sat, Dec 15, 2001 at 11:42:56PM -0500, Andrew G. Hammond wrote:
>
> Yep, and they're called VIEWs.  Personally, if the data models well to a
> single table, then I'd stick with a single table design.  Use VIEWs to
> break up access and write RULEs to handle INSERT, UPDATE and DELETES.
>



--
mag. peter pilsl

phone: +43 676 3574035
fax  : +43 676 3546512
email: pilsl@goldfisch.at
sms  : pilsl@max.mail.at

pgp-key available

Вложения

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

Предыдущее
От: "Emmanuel Asante"
Дата:
Сообщение: PostgreSQL 7.1.3 Installation Problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL 7.1.3 Installation Problem