mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 12:20:31 +01:00
written a generic framework of rules that the contrib makefiles can use instead of writing their own each time. You only need to set a few variables and off you go. |
||
|---|---|---|
| .. | ||
| Makefile | ||
| noup.c | ||
| noup.sql.in | ||
| README.noup | ||
noupdate
~~~~~~~~
- trigger to prevent updates on single columns.
Example:
~~~~~~~
CREATE TABLE TEST ( COL1 INT, COL2 INT, COL3 INT );
CREATE TRIGGER BT BEFORE UPDATE ON TEST FOR EACH ROW
EXECUTE PROCEDURE
noup ('COL1');
-- Now Try
INSERT INTO TEST VALUES (10,20,30);
UPDATE TEST SET COL1 = 5;