From: Mikail Majorov <mik(at)ttn(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject:
Date: 2002-01-18 13:27:43
Message-ID: 20020118162743.1c478689.mik@ttn.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Terényi Balázs 2002-01-18 13:41:48 Session id
Previous Message Vince Vielhaber 2002-01-18 13:23:50 Re: Books on PostgreSQL