I made a change so the 0-or-1 based indexing is a compile time option. line 42 of postgis_fn.c is: #define NfunctionFirstPoint 1 if you want the old behavior (0-based indexing): #define NfunctionFirstPoint 0 dave ps. this is NOT committed yet.