[postgis-devel] To PL/pgSQL or not to PL/pgSQL

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Aug 19 13:10:25 PDT 2010


Hi,

Are functions written in C REALLY faster than functions written in PL/pgSQL? Why?

Is there any rule saying what king of function should be better implemented in C and what kind should be better (of OK) in PL/pgSQL?

Do you guys prefer to publish a slower PL/pgSQL function NOW (warning that it might be implemented in C later with the same signature) or wait months that the C equivalent is implemented?

I understand that most of the PostGIS functionality is in GEOS but we don't have a GEOS equivalent for WKT Raster (we have GDAL but it's very limited in terms of analysis functionality) and I feel that everything would go much faster implementing many things in PL/pgSQL. For example right now I'm implementing a nice ST_MapAlgebra function in PL/pgSQL. I have no idea if it would be really much faster in C. I love PL/pgSQL...

Thanks for your advices,

Pierre




More information about the postgis-devel mailing list