От:
Mikail Majorov <mik@ttn.ru>
Дата:
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.