[postgis-devel] Error in PLPython portion of using_raster_dataman.html

Stephen Mather stephen at smathermather.com
Mon Dec 9 21:28:58 PST 2013


http://www.postgis.net/docs/manual-2.1/using_raster_dataman.html#RT_PLPython


C-style comments, should be a double-dash:

//plpython postgresql stored proc.  Requires you have plpython installed
CREATE OR REPLACE FUNCTION write_file (param_bytes bytea, param_filepath text)
RETURNS text
AS $$
f = open(param_filepath, 'wb+')
f.write(param_bytes)
return param_filepath
$$ LANGUAGE plpythonu;


should be

--plpython postgresql stored proc.  Requires you have plpython installed
CREATE OR REPLACE FUNCTION write_file (param_bytes bytea, param_filepath text)
RETURNS text
AS $$
f = open(param_filepath, 'wb+')
f.write(param_bytes)
return param_filepath
$$ LANGUAGE plpythonu;



More information about the postgis-devel mailing list