postgresql/contrib/noupdate
Bruce Momjian 558fae16e3 The attached patch enables the contrib subtree to build cleanly under
Cygwin with the possible exception of mSQL-interface.  Since I don't
have mSQL installed, I skipped this tool.

Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.

I tested the build aspect of this patch under Cygwin and Linux without
any ill affects.  Note that I did not actually attempt to test the code
for functionality.

The procedure to apply the patch is as follows:

    $ # save the attachment as /tmp/contrib.patch
    $ # change directory to the top of the PostgreSQL source tree
    $ patch -p0 </tmp/contrib.patch

Jason
2001-06-18 21:38:02 +00:00
..
Makefile The attached patch enables the contrib subtree to build cleanly under 2001-06-18 21:38:02 +00:00
noup.c Revise handling of oldstyle/newstyle functions per recent discussions 2000-11-20 20:36:57 +00:00
noup.sql.in Revise handling of oldstyle/newstyle functions per recent discussions 2000-11-20 20:36:57 +00:00
README.noup Add missing /contrib files 2000-06-19 14:02:16 +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;