/ db / views /
/db/views/defaults.m4
1 dnl Copyright (C) 2012 The Meme Factory, Inc., http://www.meme.com/
2 dnl
3 dnl This file is part of Gombe-MI.
4 dnl
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.
9 dnl
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.
14 dnl
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/>.
17 dnl
18 dnl Karl O. Pinc <kop@meme.com>
19 dnl
20 dnl m4 includes.
21 include(`copyright.m4')
22 include(`constants.m4')
23
24 dnl The defaults for views.
25 dnl
26 dnl This exists so that SERIAL columns that are exposed in views
27 dnl are indeed SERIAL.
28
29 -- -- foo
30 -- SELECT 'foo';
31 -- ALTER TABLE foo
32 -- ALTER COLUMN fooid
33 -- SET DEFAULT nextval('foo_fooid_seq'::regclass);
34
35 -- biography
36 SELECT 'biography';
37 ALTER TABLE biography
38 ALTER COLUMN import_datetime
39 SET DEFAULT LOCALTIMESTAMP(0);