From 7e0ab78c7eb946e13127b0b31e07564b6e9dc598 Mon Sep 17 00:00:00 2001
From: Christopher Lenke <christopher.lenke@uni-bielefeld.de>
Date: Mon, 23 Sep 2024 19:20:18 +0200
Subject: [PATCH] =?UTF-8?q?L=C3=B6sche=20is=5Fhi=5Fin=5Fdate=5Fpg=5Fint8?=
 =?UTF-8?q?=5F=5Fdate=5F=5Fdate=5F.txt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../is_hi_in_date_pg_int8__date__date_.txt    | 43 -------------------
 1 file changed, 43 deletions(-)
 delete mode 100644 Functions/is_hi_in_date_pg_int8__date__date_.txt

diff --git a/Functions/is_hi_in_date_pg_int8__date__date_.txt b/Functions/is_hi_in_date_pg_int8__date__date_.txt
deleted file mode 100644
index 5e9eaa0..0000000
--- a/Functions/is_hi_in_date_pg_int8__date__date_.txt
+++ /dev/null
@@ -1,43 +0,0 @@
--- DROP FUNCTION schema_xyz.is_hi_in_date_pg(int8, date, date);
-
-CREATE OR REPLACE FUNCTION schema_xyz.is_hi_in_date_pg(my_uid bigint, my_first_date date, my_last_date date)
- RETURNS bigint
- LANGUAGE plpgsql
-AS $function$
-	
-
-DECLARE
-
-
-ergebnis bigint;
-
-
-BEGIN
-
-select count(*) into ergebnis
-from schema_xyz.relation where uid_1=my_uid and uid_0=0 
-and type in (0,1) 
---and ((extract(year from first_date) <= my_first_year and extract(year from last_date) > my_first_year) 
---or (extract(year from first_date) < my_last_year and extract(year from last_date) >=  my_last_year));
-and ((first_date >= my_first_date and first_date <= my_last_date) 
-or (last_date >= my_first_date and last_date <=  my_last_date)
-or (first_date <= my_first_date and last_date >=  my_last_date)
-);
-
-/*
-if my_first_year=my_last_year then 
-select count(*) into ergebnis 
-from relation where uid_1=my_uid and uid_0=0 
-and type in (0,1) 
-and ((extract(year from first_date) = my_first_year and extract(year from last_date) =  my_last_year));
-end if;
-*/
-if ergebnis >0 then ergebnis:=1;
-else ergebnis:=0;
-end if;
-
-RETURN ergebnis;
-end;
-
-$function$
-;
-- 
GitLab