You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define binary transfer for custom types dynamically on PGConnection #2554
Feature request
I would like to be able to specify binary transfer for custom data types dynamically on a PGConnection instance.
Similar to what I can do to add handling for custom types using PGConnection.addDataType.
Use case
The main use case for this will be connections that I did not create on my own (where I could set properties).
So for example if the PGConnection I use is not created by my application itself, but e.g. by the application server that runs it.
And I would like to allow using binary transfer for PostGIS geometries using the library postgis-java-ng, which already allows adding the handled types dynamically to a PGConnection.
Scope
This function should be optional and not always enforce binary transfer.
In contrast to #1884 I do not want to enable this behavior automatically.
I will look deeper into the code for enabling the binary transfer and might try to provide an according pull request.
I created a pull request #2556 to be able to get existing oids for binary sending and receiving from the QueryExecutor as well as add new oids to it.
This should be sufficient for adding single oids for custom types that should support binary transfers.
Activity
sebasbaumh commentedon Jun 24, 2022
While looking at the source code, I just noted that it is possible to adjust the binary transferred oids by
using
QueryExecutor.setBinaryReceiveOidsorQueryExecutor.setBinarySendOids.And the
QueryExecutoritself can be retrieved usingBaseConnection.getQueryExecutor().The only issue with this is that
BaseConnection(extendingPGConnection) explicitly states that Application code should not depend on this interface.sebasbaumh commentedon Jun 24, 2022
I created a pull request #2556 to be able to get existing oids for binary sending and receiving from the
QueryExecutoras well as add new oids to it.This should be sufficient for adding single oids for custom types that should support binary transfers.
And I refrained from changing
PGConnectionas it is sufficient to change types in theQueryExecutoras there is only a single instance per connection.feat: Define binary transfer for custom types dynamically/automatical…
Update all non-major dependencies (mulk/mulkcms2!13)
chore(deps): Update misk-deps-minor-patch
chore(deps): Update misk-deps-minor-patch