I am wondering if there is a possibility of programming new functions for PostGIS using Java, so that you can refer them same way as classic PostGIS functions are. Something like this:

CREATE OR REPLACE FUNCTION public.st_line_interpolate_point(geometry, double precision)
  RETURNS geometry AS
'$libdir/postgis-2.0', 'LWGEOM_line_interpolate_point'
  COST 1;

I know that most of PostGIS functions are written in C however I am not very familiar with that language.

  • 1
    Note that PostGIS 1.5 and earlier had PL/Java support for PostGIS geometries, but it was dropped for the 2.0 release since it was always pre-Alpha quality, and not maintained since 2006. However, this shouldn't prevent you from using PL/Java for general purpose PostgreSQL functions.
    – Mike T
    Commented Apr 2, 2012 at 21:35

1 Answer 1


Yes, it is possible to add PL/Java:


Be sure to read up on the security issues involved in adding a new procedural language to PostgreSQL.

  • Thank you very much, I will make sure to check those security issues.
    – Jan Caha
    Commented Apr 2, 2012 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.