I'm not new to postgresql, but also I'm not exactly a specialist.
I have executed this sql to create a function in postgresql :
CREATE OR REPLACE FUNCTION public.trg_corrigeer_geometrie()
RETURNS trigger AS
$BODY$
BEGIN
IF NOT (st_isvalid(NEW.geometry)) THEN
NEW.geometry := st_multi(public.cleangeometry(NEW.geometry));
END IF;
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION public.trg_corrigeer_geometrie()
OWNER TO postgres;
It returnes "Query returned sucessfully with ... "
When I try to check if it exists:
select * from pg_trigger where tgname = 'trg_corrigeer_geometrie'
It gives me an empty table. I don't really get why? The function public.cleangeometry does exist, it doesn't give me an error, so none of that can be the problem. I'm really a bit baffled by this.