| I looked into this a bit deeper, and I now understand what the problem is, and why the current integration test suite didn't pick up the problem. First, the problem is quite general and not limited to either PG9.5 or the buffer function. The user passed a geometry value into a the argument of a spatial function. All spatial values are bound as a byte array. This works for geometry columns, but not for function arguments. (I tested it with the boundary, and distance functions. I get the exact same error message). To fully fix this, we need to change the PGGeometryTypeDescriptor, and use the setObject with PGobject method rather than the setBytes method (that will ensure casting in all cases, incl. function arguments). I tested this, and it seems OK. We didn't notice this error, because the test suite currently only uses geometry columns as arguments in functions. We should definitely expand the test suite for these cases. |