Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 Apr 2 '12 at 21:35
up vote 4 down vote accepted

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.

share|improve this answer
Thank you very much, I will make sure to check those security issues. – Jan Caha Apr 2 '12 at 17:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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