1 Copyright (C) 2004, 2008, Karl O. Pinc
3 This file is part of Gombe-MI.
5 Gombe-MI is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
18 Karl O. Pinc <kop@meme.com>
20 Directory for database functions (stored procedures).
22 All functions beginning with _ are internal and are not called by
23 users. Nobody is granted privlidges to execute these as they are
24 executed from functions which run as SECURITY DEFINER.
26 All functions should m4 include constants.m4 because they might
27 someday need them and this will catch any conflicts. In practice,
28 this is moot as the build process crams everything together into a
29 single output file anyhow so long as the first file includes
30 constants.m4 all the files see the constants.
32 All the functions are broken out into their own files because it got
33 to take _way_ too long to install them all at once into Postgresql.
34 This way they can be debugged and installed individually. For this
35 reason too, the standard for functions is to use CREATE OR REPLACE
36 FUNCTION instead of just CREATE FUNCTION.
38 As Postgresql functions pass arguments by value, when a function needs
39 to return more than one value a Postgresql datatype (not the same as
40 an SQL datatype) is declared for use as the functions return value.
41 These can be found in the maketypes.m4 file.