Subject Properties for Firebird 4 datatype support in Jaybird 3 broken on recent Firebird 4 snapshots
Author Mark Rotteveel
Due to an implementation change in Firebird 4, the connection properties
timeZoneBind (alias: time_zone_bind) and decfloatBind (alias:
decfloat_bind), introduced in Jaybird 3.0.6 and Jaybird 4 test versions,
no longer work as documented with Firebird 4 snapshot versions
4.0.0.1683 or higher.

Due to a remapping of DPB constants, the constant Jaybird 3.0.6 - 3.0.8
and Jaybird 4 uses for timeZoneBind is now used for the new set_bind DPB
item.

So, as a workaround, the timeZoneBind property can be temporarily used
to define the SET BIND config documented on
https://github.com/FirebirdSQL/firebird/tree/master/doc/sql.extensions.
This workaround will only work temporarily and will be removed in the
next Jaybird 3 release when the new properties have been added.

This new DPB item maps semicolon-separated <datatype> TO <datatype> to
remap arbitrary datatypes. Given the use of semicolons in Jaybird
connection strings to separate connection properties, you can't specify
multiple items in a connection string, you will need to use a Properties
file or a DataSource setter for this.

Some examples:

old:
timeZoneBind=legacy
workaround:
timeZoneBind=TIME WITH TIME ZONE TO TIME,TIMESTAMP WITH TIME ZONE TO
TIMESTAMP
or (very explicit):
timeZoneBind=TIME WITH TIME ZONE TO TIME WITHOUT TIME ZONE,TIMESTAMP
WITH TIME ZONE TO TIMESTAMP WITHOUT TIME ZONE

old:
decfloatBind=char
workaround:
timeZoneBind=DECFLOAT TO CHAR(50)
or (if you want to control per type):
timeZoneBind=DECFLOAT(16) TO CHAR(50),DECFLOAT(34) TO CHAR(50)
or (for simplicity):
timeZoneBind=DECFLOAT(16) TO VARCHAR,DECFLOAT(34) TO VARCHAR

old:
decfloatBind=double precision
workaround:
timeZoneBind=DECFLOAT to DOUBLE PRECISION

In addition, the undocumented properties decfloat_round and
decfloat_traps no longer work, or more specifically, the Jaybird
decfloat_bind points to Firebird decfloat_round and Jaybird
decfloat_round points to Firebird decfloat_traps.

Jaybird 3.0.9 and Jaybird 4.0.0 beta 2 will address, but this will
effectively mean that those versions will not be (entirely) compatible
with Firebird 4 before snapshot 4.0.0.1683.

Mark
--
Mark Rotteveel