postgresql/contrib/noupdate
2000-06-16 18:59:30 +00:00
..
Makefile Cleanup README Makefile installs. 2000-06-16 18:59:30 +00:00
noup.c Second round of fmgr changes: triggers are now invoked in new style, 2000-05-29 01:59:17 +00:00
noup.example /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
noup.source /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
noup.sql.in Add missing /contrib files to CVS. 2000-06-15 19:05:22 +00:00
README /contrib patch from Karel. 2000-06-15 18:55:34 +00:00


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;