/usr/share/doc/firebird2.5-common-doc/doc/sql.extensions/README.hex_literals.txt is in firebird2.5-doc 2.5.2.26540.ds4-9ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ==============================================
Hexadecimal Numeric and Binary String Literals
==============================================
Support for hexadecimal numeric and binary string literals.
Authors:
Bill Oliver <Bill.Oliver@sas.com>
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
Syntax:
<numeric hex literal> ::=
{ 0x | 0X } <hexit> [ <hexit>... ]
<binary string literal> ::=
{ x | X } <quote> [ { <hexit> <hexit> }... ] <quote>
<digit> ::=
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<hexit> ::=
<digit> | A | B | C | D | E | F | a | b | c | d | e | f
Notes (numeric hex literal):
- The max number of <hexit> should be 16.
- If the number of <hexit> is greater than 8, the constant data type is a signed BIGINT. If it's
less or equal than 8, the data type is a signed INTEGER. That means 0xF0000000 is -268435456 and
0x0F0000000 is 4026531840.
Notes (binary string literal):
- The resulting string is defined as a CHAR(N / 2) CHARACTER SET OCTETS, where N is the number of <hexit>.
Example:
select 0x10, cast('0x0F0000000' as bigint) from rdb$database;
select x'deadbeef' from rdb$database;
|