From 27cc5749aa0a60296c6383f3a60d969b17c278a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 6 Oct 2015 16:04:53 +0200 Subject: [PATCH] =?utf8?q?neue=20Aggregatfunktion=20"FIRST",=20f=C3=BCr=20?= =?utf8?q?Auswertungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sql/Pg-upgrade2/first_aggregator.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sql/Pg-upgrade2/first_aggregator.sql 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 +); -- 2.20.1