# HG changeset patch # User Alexandre Fayolle # Date 1260954360 -3600 # Node ID 2eb47c1efee12bb70bbd61a64cb785895d73678a # Parent 21517d42f2edbce143d58c277a5e8920ce1a6874 make cubicweb-ctl db-init -d work with postgresql backend diff -r 21517d42f2ed -r 2eb47c1efee1 schemas/_regproc.postgres.sql --- a/schemas/_regproc.postgres.sql Tue Dec 15 11:30:44 2009 +0100 +++ b/schemas/_regproc.postgres.sql Wed Dec 16 10:06:00 2009 +0100 @@ -5,10 +5,12 @@ */ +DROP FUNCTION IF EXISTS comma_join (anyarray) CASCADE; CREATE FUNCTION comma_join (anyarray) RETURNS text AS $$ SELECT array_to_string($1, ', ') $$ LANGUAGE SQL;; +DROP AGGREGATE IF EXISTS group_concat (anyelement) CASCADE; CREATE AGGREGATE group_concat ( basetype = anyelement, sfunc = array_append, @@ -19,6 +21,7 @@ +DROP FUNCTION IF EXISTS limit_size (fulltext text, format text, maxsize integer); CREATE FUNCTION limit_size (fulltext text, format text, maxsize integer) RETURNS text AS $$ DECLARE plaintext text; @@ -39,7 +42,7 @@ END $$ LANGUAGE plpgsql;; - +DROP FUNCTION IF EXISTS text_limit_size (fulltext text, maxsize integer); CREATE FUNCTION text_limit_size (fulltext text, maxsize integer) RETURNS text AS $$ BEGIN RETURN limit_size(fulltext, 'text/plain', maxsize);