PostGIS JDBC does not request Point geometry column in TWKB with prepared statements enabled

Description

A Post GIS table with point geometry, when configured to use prepared statements, does not use the same select qualifier for geometry column, which is used when the data store is configured to NOT use prepared statements.

Without Prepared statement enabled
encode(ST_AsTWKB(ST_Simplify(ST_Force2D("the_geom"), 0.00439453125, true),3), 'base64')

With Prepared statement enabled - Wrong qualifier
`ST_AsBinary("the_geom")

This qualifier ends up requesting WKB instead of TWKB, breaking the decoding of geometry inside the PostGISDialect implementation.

The correct select qualifier should be something like
ST_AsTWKB(ST_Simplify(ST_Force2D("the_geom"), 0.00439453125, true),3)

Environment

None

Activity

Show:
Imran Rajjad
February 6, 2020, 6:01 AM

(23.x master)

Imran Rajjad
February 6, 2020, 4:44 PM

(22.x backport)

Fixed

Assignee

Imran Rajjad

Reporter

Imran Rajjad

Triage

Components

Fix versions

Affects versions

Priority

High
Configure