From bb18d71995335f41c8cf97a36c84b7ee7ce77652 Mon Sep 17 00:00:00 2001 From: Guido Fioravantti Date: Mon, 26 Oct 2015 16:15:55 +0100 Subject: [PATCH] Adds comment for magic number and constant for maxlen 173 --- scripts-available/CDB_Helper.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts-available/CDB_Helper.sql b/scripts-available/CDB_Helper.sql index 40d5c02..b24e3c3 100644 --- a/scripts-available/CDB_Helper.sql +++ b/scripts-available/CDB_Helper.sql @@ -10,10 +10,10 @@ DECLARE ident TEXT; i INTEGER; origident TEXT; - maxlen INTEGER; -BEGIN - maxlen := 63; + maxlen CONSTANT integer := 63; +BEGIN + -- Accounts for the _XX incremental suffix in case the identifier is taken usedspace := 3; usedspace := usedspace + coalesce(octet_length(prefix), 0); usedspace := usedspace + coalesce(octet_length(suffix), 0); @@ -68,10 +68,10 @@ DECLARE ident TEXT; i INTEGER; origident TEXT; - maxlen INTEGER; -BEGIN - maxlen := 63; + maxlen CONSTANT integer := 63; +BEGIN + -- Accounts for the _XX incremental suffix in case the identifier is taken usedspace := 3; usedspace := usedspace + coalesce(octet_length(prefix), 0); usedspace := usedspace + coalesce(octet_length(suffix), 0);