postgresql/contrib/noupdate
2003-11-29 19:52:15 +00:00
..
Makefile $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
noup.c Error message editing in contrib (mostly by Joe Conway --- thanks Joe!) 2003-07-24 17:52:50 +00:00
noup.sql.in Backend support for autocommit removed, per recent discussions. The 2003-05-14 03:26:03 +00:00
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;