Skip to content
Snippets Groups Projects
Commit 3c1fceb3 authored by Christopher Lenke's avatar Christopher Lenke
Browse files

23.09.2024

parent 522fc503
No related merge requests found
-- DROP FUNCTION christines_space.is_te_pg(int8);
CREATE OR REPLACE FUNCTION christines_space.is_te_pg(my_uid bigint)
RETURNS character varying
LANGUAGE plpgsql
AS $function$
DECLARE
ergebnis bigint;
BEGIN
select count(*) into STRICT ergebnis
from relation where uid_1::bigint=my_uid::bigint and uid_0::bigint>0 and type::varchar in (0,1);
if ergebnis >0 then ergebnis:=1;
else ergebnis:=0;
end if;
RETURN ergebnis;
end;
$function$
;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment