[postgis-users] handling invalid geometry within a trigger

Nicolas Ribot nicolas.ribot at gmail.com
Mon Feb 15 07:25:17 PST 2016


Hi,

In plpgsql, you can catch the error that will be generated by such a
polygon:

http://www.postgresql.org/docs/9.5/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

Nicolas

On 15 February 2016 at 15:43, LPlateAndy <andy at centremaps.co.uk> wrote:

> Hi,
>
> I have a postgresql trigger function which creates a geometry from WKT
> before data in inserted into the table. Saves on temp tables or on loading
> and then updating.
>
> Is there a way (possibly a plpgsql not postgis question) to ignore (treat
> as
> NULL) a bum geometry - e.g a polygon with a single point
>
> Andy
>
>
>
> --
> View this message in context:
> http://postgis.17.x6.nabble.com/handling-invalid-geometry-within-a-trigger-tp5009691.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160215/19558c00/attachment.html>


More information about the postgis-users mailing list