dnl Copyright (C) 2012 The Meme Factory, Inc., http://www.meme.com/
dnl
dnl This file is part of Gombe-MI.
dnl
dnl Gombe-MI is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Gombe-MI. If not, see .
dnl
dnl Functions and triggers to prevent insert, update, and delete into
dnl the auto generated views.
dnl
dnl Karl O. Pinc
dnl
dnl
-- Triggers for foo to prevent insert/update/delete.
SELECT 'foo`'_insert_trigger' AS trigger;
CREATE TRIGGER foo`'_insert_trigger
INSTEAD OF INSERT
ON foo FOR EACH ROW
EXECUTE PROCEDURE _error_immutable_view();
SELECT 'foo`'_update_trigger' AS trigger;
CREATE TRIGGER foo`'_update_trigger
INSTEAD OF UPDATE
ON foo FOR EACH ROW
EXECUTE PROCEDURE _error_immutable_view();
SELECT 'foo`'_delete_trigger' AS trigger;
CREATE TRIGGER foo`'_delete_trigger
INSTEAD OF DELETE
ON foo FOR EACH ROW
EXECUTE PROCEDURE _error_immutable_view();