Message posté par : chowchow (dchambret(a)atd16.fr)
----------------------------------------
Bonjour,
Quand je créé ma donnée le srid est en 4326. Et je voudrais qu il soit à 0.
Pour cela j 'ai fais une fonction trigger :
CREATE OR REPLACE FUNCTION atd16_patrimoine_foncier.f_srid()
RETURNS trigger
LANGUAGE 'plpgsql'
COST 100
VOLATILE NOT LEAKPROOF
AS $BODY$
BEGIN
NEW.the_geom := ST_SetSRID(the_geom,0);
END;
$BODY$;
ALTER FUNCTION atd16_patrimoine_foncier.f_srid()
OWNER TO sditecgrp;
GRANT EXECUTE ON FUNCTION atd16_patrimoine_foncier.f_srid() TO sditecgrp;
GRANT EXECUTE ON FUNCTION atd16_patrimoine_foncier.f_srid() TO PUBLIC;
La fonction est acceptée mais lors de l'intégration d'une nouvelle j'ai un
message d'erreur :
ERROR: control reached end of trigger procedure without RETURN
CONTEXT: PL/pgSQL function atd16_patrimoine_foncier.f_srid()
État SQL : 2F005
Qu est ce que je dois modifier dans ma fonction pour modifier le Srid lors de la création
de l'objet ?
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=351804#p351804
Pour y répondre : geobd(a)ml.georezo.net ou reply de votre messagerie
Pour vous désabonner connectez-vous sur le forum puis Profil / Abonnement
--
Association GeoRezo - le portail géomatique
https://georezo.net