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

23.09.2024

parent 4fd0b436
No related branches found
No related tags found
No related merge requests found
-- DROP FUNCTION schema_xyz.is_te_plus_7_pg(int8);
CREATE OR REPLACE FUNCTION schema_xyz.is_te_plus_7_pg(my_uid bigint)
RETURNS bigint
LANGUAGE plpgsql
AS $function$
DECLARE
ergebnis bigint;
BEGIN
select count(*) into STRICT ergebnis
from schema_xyz.relation where uid_1=my_uid and uid_0>0 and type in (0,1,7);
if ergebnis >0 then ergebnis:=1;
else ergebnis:=0;
end if;
RETURN ergebnis;
end;
$function$
;
\ No newline at end of file
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