From: Sven Schöling Date: Tue, 6 Oct 2015 14:04:53 +0000 (+0200) Subject: neue Aggregatfunktion "FIRST", für Auswertungen X-Git-Tag: release-3.4.1~640 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=27cc5749aa0a60296c6383f3a60d969b17c278a2;p=kivitendo-erp.git neue Aggregatfunktion "FIRST", für Auswertungen --- diff --git a/sql/Pg-upgrade2/first_aggregator.sql b/sql/Pg-upgrade2/first_aggregator.sql new file mode 100644 index 000000000..9803988a0 --- /dev/null +++ b/sql/Pg-upgrade2/first_aggregator.sql @@ -0,0 +1,15 @@ +-- @tag: first_aggregator +-- @description: SQL Aggregat Funktion FIRST +-- @depends: release_3_0_0 +-- @encoding: utf-8 + +CREATE OR REPLACE FUNCTION public.first_agg ( anyelement, anyelement ) +RETURNS anyelement LANGUAGE SQL IMMUTABLE STRICT AS $$ + SELECT $1; +$$; + +CREATE AGGREGATE public.FIRST ( + sfunc = public.first_agg, + basetype = anyelement, + stype = anyelement +);