mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove useless whitespace at end of lines
This commit is contained in:
@ -20,11 +20,11 @@ CREATE INDEX CI ON C (REFC);
|
||||
--Trigger for table A:
|
||||
|
||||
CREATE TRIGGER AT BEFORE DELETE OR UPDATE ON A FOR EACH ROW
|
||||
EXECUTE PROCEDURE
|
||||
EXECUTE PROCEDURE
|
||||
check_foreign_key (2, 'cascade', 'ID', 'B', 'REFB', 'C', 'REFC');
|
||||
/*
|
||||
2 - means that check must be performed for foreign keys of 2 tables.
|
||||
cascade - defines that corresponding keys must be deleted.
|
||||
cascade - defines that corresponding keys must be deleted.
|
||||
ID - name of primary key column in triggered table (A). You may
|
||||
use as many columns as you need.
|
||||
B - name of (first) table with foreign keys.
|
||||
@ -38,11 +38,11 @@ REFC - name of foreign key column in this table.
|
||||
--Trigger for table B:
|
||||
|
||||
CREATE TRIGGER BT BEFORE INSERT OR UPDATE ON B FOR EACH ROW
|
||||
EXECUTE PROCEDURE
|
||||
EXECUTE PROCEDURE
|
||||
check_primary_key ('REFB', 'A', 'ID');
|
||||
|
||||
/*
|
||||
REFB - name of foreign key column in triggered (B) table. You may use as
|
||||
REFB - name of foreign key column in triggered (B) table. You may use as
|
||||
many columns as you need, but number of key columns in referenced
|
||||
table must be the same.
|
||||
A - referenced table name.
|
||||
@ -52,7 +52,7 @@ ID - name of primary key column in referenced table.
|
||||
--Trigger for table C:
|
||||
|
||||
CREATE TRIGGER CT BEFORE INSERT OR UPDATE ON C FOR EACH ROW
|
||||
EXECUTE PROCEDURE
|
||||
EXECUTE PROCEDURE
|
||||
check_primary_key ('REFC', 'A', 'ID');
|
||||
|
||||
-- Now try
|
||||
|
Reference in New Issue
Block a user