[Greater-commits] r269 - trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 27 11:14:11 CEST 2011
Author: bricks
Date: 2011-06-27 11:14:11 +0200 (Mon, 27 Jun 2011)
New Revision: 269
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql
Log:
Fix indentation and postgres problem with encoding of ?\195?\188 in comment on linux
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-06-27 09:13:18 UTC (rev 268)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-06-27 09:14:11 UTC (rev 269)
@@ -1,39 +1,39 @@
/************************************************************************
- * Name :create_db_objects.sql *
- * Issue :03-09-2003 - H. Korte - Intevation - Osnabrueck *
- * Purpose :create seq.'s, func.'s, triggers and tables in spec. db *
- * Parameter: *
- * Changes : *
- * [ Date ] - [ Name ] - [ Action ] *
+ * Name :create_db_objects.sql *
+ * Issue :03-09-2003 - H. Korte - Intevation - Osnabrueck *
+ * Purpose :create seq.'s, func.'s, triggers and tables in spec. db *
+ * Parameter: *
+ * Changes : *
+ * [ Date ] - [ Name ] - [ Action ] *
************************************************************************/
/********************************************************
- * 1 - GROUP_SEQ *
+ * 1 - GROUP_SEQ *
********************************************************
- * *
- * CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname *
- * [ INCREMENT [ BY ] increment ] *
- * [ MINVALUE minvalue | NO MINVALUE ] *
- * [ MAXVALUE maxvalue | NO MAXVALUE ] *
- * [ START [ WITH ] start ] *
- * [ CACHE cache ] *
- * [ [ NO ] CYCLE ] *
- * *
- * increment - The default value is 1 *
- * positive value -> ascending sequence *
- * negative value -> descending sequence *
- * *
- * MINVALUE - NO MINVALUE is default *
- * *
- * MAXVALUE - NO MAXVALUE is default *
- * *
+ * *
+ * CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname *
+ * [ INCREMENT [ BY ] increment ] *
+ * [ MINVALUE minvalue | NO MINVALUE ] *
+ * [ MAXVALUE maxvalue | NO MAXVALUE ] *
+ * [ START [ WITH ] start ] *
+ * [ CACHE cache ] *
+ * [ [ NO ] CYCLE ] *
+ * *
+ * increment - The default value is 1 *
+ * positive value -> ascending sequence *
+ * negative value -> descending sequence *
+ * *
+ * MINVALUE - NO MINVALUE is default *
+ * *
+ * MAXVALUE - NO MAXVALUE is default *
+ * *
* START - default starting value is minvalue for *
- * ascending sequences and maxvalue for *
- * descending *
- * *
- * CACHE - Hope, no cache is default *
- * *
- * CYCLE - No CYCLE is default *
+ * ascending sequences and maxvalue for *
+ * descending *
+ * *
+ * CACHE - Hope, no cache is default *
+ * *
+ * CYCLE - No CYCLE is default *
********************************************************/
CREATE SEQUENCE GROUP_SEQ MINVALUE 1 START 100;
@@ -1187,30 +1187,30 @@
IF v_max >= v_curr THEN -- if csv lower than max id
v_diff := v_max - v_curr; -- set seq to first possible val
SELECT setval(''RES_STRETCH_SEQ'',v_diff + 1);
- END IF;
+ END IF;
RETURN 1;
END;
'LANGUAGE 'plpgsql';
/********************************************************
- * 51 - pg_decode(numeric, numeric, numeric, numeric) *
- * -> function, that operates Conditional *
- * Expressions on numerics. *
- * *
- * Example: pg_decode(var1, -1, 0, var1) *
- * Falls var1 == -1 ist, dann gib 0 zurück, sonst var1 *
+ * 51 - pg_decode(numeric, numeric, numeric, numeric) *
+ * -> function, that operates Conditional *
+ * Expressions on numerics. *
+ * *
+ * Example: pg_decode(var1, -1, 0, var1) *
+ * Falls var1 == -1 ist, dann gib 0 zurueck, sonst var1 *
********************************************************/
CREATE FUNCTION pg_decode( numeric, numeric, numeric, numeric ) RETURNS
numeric AS '
DECLARE
- output_value numeric;
+ output_value numeric;
BEGIN
- SELECT CASE WHEN $1=$2 THEN $3
+ SELECT CASE WHEN $1=$2 THEN $3
ELSE $4
- END
- INTO output_value;
- return output_value;
+END
+ INTO output_value;
+ return output_value;
END;
-' LANGUAGE 'plpgsql' ;
+' LANGUAGE 'plpgsql';
More information about the Greater-commits
mailing list