postgresql/contrib/noupdate
Bruce Momjian aa4c702eac Update /contrib for "autocommit TO 'on'".
Create objects in public schema.

Make spacing/capitalization consistent.

Remove transaction block use for object creation.

Remove unneeded function GRANTs.
2002-10-18 18:41:22 +00:00
..
Makefile
noup.c Change made to elog: 2002-03-06 06:10:59 +00:00
noup.sql.in Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +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;