1 dnl Copyright (C) 2012 The Meme Factory, Inc., http://www.meme.com/
3 dnl This file is part of Gombe-MI.
5 dnl Gombe-MI is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
18 dnl Functions and triggers to prevent insert, update, and delete into
19 dnl the auto generated views.
21 dnl Karl O. Pinc <kop@meme.com>
25 -- Triggers for foo to prevent insert/update/delete.
27 SELECT 'foo`'_insert_trigger' AS trigger;
28 CREATE TRIGGER foo`'_insert_trigger
31 EXECUTE PROCEDURE _error_immutable_view();
33 SELECT 'foo`'_update_trigger' AS trigger;
34 CREATE TRIGGER foo`'_update_trigger
37 EXECUTE PROCEDURE _error_immutable_view();
39 SELECT 'foo`'_delete_trigger' AS trigger;
40 CREATE TRIGGER foo`'_delete_trigger
43 EXECUTE PROCEDURE _error_immutable_view();