mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
> Sure send it in, we can put it in contrib. > > > > > I wrote a
real small function to revoke update on a column. The function > > doesn't do anything > > fancy like checking user ids. > > > > I copied most of it from the refint.c in the contrib directory. > > > > Should I post this somewhere? It really isn't very big. > > Here it is... -- | Email - rick@rpacorp.com Rick Poleshuck | Voice - (908) 653-1070 Fax - (908) 653-0265 | Mail - RPA Corporation | - 308 Elizabeth Avenue, Cranford, New Jersey 07016
This commit is contained in:
9
contrib/noupdate/noup.example
Normal file
9
contrib/noupdate/noup.example
Normal file
@ -0,0 +1,9 @@
|
||||
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;
|
Reference in New Issue
Block a user