13.09.2021 16:59, Maya Opperman wrote:
   Another possibility is to set coercion rules for new data type for your 
connection, see

https://firebirdsql.org/file/documentation/release_notes/html/en/4_0/rlsnotes40.html#rnfb4-msql-set-bind-native-to-legacy-coercion-rules

Thanks Vlad! In this example from this link:

SET BIND OF DECFLOAT TO DOUBLE PRECISION;
SELECT CAST('123.45' AS DECFLOAT(16)) FROM RDB$DATABASE;        --double

Does this need to be done within every transaction that is started, or per 
connection/session, or once off per database?

  The coercion rule (binding) become active immediately after corresponding
statement (SET BIND OF) is executed and stay active until disconnect or new
"SET BIND OF" is executed for the same data type. The scope of the rule is
all subsequent statements in the connection. Other connections are not
affected.

  See also common description of session management statement at the start
of the same chapter,

Hope it helps,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to