On 2020-09-02 14:06, Jiří Činčura wrote:
Nobody? Seems like a bug to me...


You've forgotten keyword OF in SET BIND statement:

SQL> set sqlda_display on;
SQL> select sum(cast(1 as bigint)) from rdb$database;

INPUT message field count: 0

OUTPUT message field count: 1
01: sqltype: 32752 INT128 Nullable scale: 0 subtype: 0 len: 16
  :  name: SUM  alias: SUM
  : table:   owner:

                                          SUM
=============================================
                                            1

SQL> set bind OF int128 to legacy;
SQL> select sum(cast(1 as bigint)) from rdb$database;

INPUT message field count: 0

OUTPUT message field count: 1
01: sqltype: 580 INT64 Nullable scale: 0 subtype: 0 len: 8
  :  name: SUM  alias: SUM
  : table:   owner:

                  SUM
=====================
                    1

SQL> show version;
ISQL Version: LI-V4.0.0.2187-dev Firebird 4.0 Release Candidate 1
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-V4.0.0.2187-dev Firebird 4.0 Release Candidate 1"
on disk structure version 13.0
SQL>


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

Reply via email to