...

Поиск
Список
Период
Сортировка
От Mikail Majorov
Тема ...
Дата
Msg-id 20020118162743.1c478689.mik@ttn.ru
обсуждение исходный текст
Список pgsql-general
Hi!

Very simple database: 3 tables - "PAYS", "SERVICES", "CONTRACTS".

Table "PAYS" (One of coloms is customers pays - "pays.sum")
Table "SERVICES" (One of coloms is customers service - "services.sum")
TABLE "CONTRACT" (One of coloms is customere account - "contract.sum")

contract.sum = pays.sum - services.sum

I want design privilages concept on native postgress database users and permissions.
I don't want grant permissions DELETE, UPDATE on table "CONTRACT" to anybody.
I grant full permissions on PAYS & SERVICE and write triger named "change account".
When somebody change "pays.sum" or "services.sum" my triger "change account" execute and
change "contract.sum". I think this behaivour give me consistent database!
How can I realize than scheme ?! I was try but triger don't update "CONTRACT" :(

Mik.

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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Books on PostgreSQL
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: Books on PostgreSQL