2008-04-22 Joerg Jaspert <joerg@debian.org>
+ * setup/init_pool.sql: added a function/aggregate for the release
+ team to base some script on it.
+
* config/debian/cron.daily: push katie@merkel to immediately start
the sync of projectb there.
CREATE INDEX binaries_fingerprint on binaries (sig_fpr);
CREATE INDEX source_fingerprint on source (sig_fpr);
CREATE INDEX dsc_files_file ON dsc_files (file);
+
+-- Own function
+CREATE FUNCTION space_concat(text, text) RETURNS text
+ AS $_$select case
+WHEN $2 is null or $2 = '' THEN $1
+WHEN $1 is null or $1 = '' THEN $2
+ELSE $1 || ' ' || $2
+END$_$
+ LANGUAGE sql;
+
+CREATE AGGREGATE space_separated_list (
+ BASETYPE = text,
+ SFUNC = space_concat,
+ STYPE = text,
+ INITCOND = ''
+);