dnl Copyright (C) 2012 The Meme Factory, Inc. http://www.meme.com/ dnl Copyright (C) 2007, 2008, Karl O. Pinc 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 Deliver an error message on an attempt to change a view. dnl Karl O. Pinc dnl dnl dnl m4 includes include(`copyright.m4') include(`constants.m4') include(`macros.m4') dnl SELECT '_error_immutable_view()'; CREATE OR REPLACE FUNCTION _error_immutable_view() RETURNS TRIGGER LANGUAGE plpgsql gmi_function_set_search_path AS $$ -- Deliver an error message on an attempt to change a view. -- -- GPL_notice(` --', `2007', `Karl O. Pinc ') -- -- Syntax: _error_immutable_view() -- -- Input: -- -- Returns: -- -- Side Effects: -- Raises an exception. -- -- Remarks: -- Used when somebody tries to modify a view. DECLARE BEGIN RAISE EXCEPTION '% is a (Gombe-MI) view which does not allow %' , TG_RELNAME , TG_OP; RETURN NULL; END; $$;