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
* Hex numbers in the range 0... 7FFF FFFF are positive ``INTEGER``s with values between 0... 2147483647 decimal.
315
+
* Hex numbers in the range `0`...`7FFF FFFF` are positive ``INTEGER``s with values between `0`...`2147483647` decimal.
318
316
To coerce a number to `BIGINT`, prepend enough zeroes to bring the total number of hex digits to nine or above.
319
317
That changes the type but not the value.
320
-
* Hex numbers between 8000 0000 ... FFFF FFFF require some attention:
318
+
* Hex numbers between `8000 0000`...`FFFF FFFF` and `8000 0000 0000 0000`...`FFFF FFFF FFFF FFFF` require some attention:
321
319
+
322
320
--
323
321
** When written with eight hex digits, as in `0x9E44F9A8`, a value is interpreted as 32-bit `INTEGER`.
324
-
Since the leftmost bit (sign bit) is set, it maps to the negative range -2147483648 ...-1 decimal.
325
-
** With one or more zeroes prepended, as in `0x09E44F9A8`, a value is interpreted as 64-bit `BIGINT` in the range 0000 0000 8000 0000 ... 0000 0000 FFFF FFFF.
326
-
The sign bit is not set now, so they map to the positive range 2147483648 ... 4294967295 decimal.
322
+
Since the leftmost bit (sign bit) is set, it maps to the negative range `-2147483648`...`-1` decimal.
323
+
** With one or more zeroes prepended, as in `0x09E44F9A8`, a value is interpreted as 64-bit `BIGINT` in the range `0000 0000 8000 0000`...`0000 0000 FFFF FFFF`.
324
+
The sign bit is not set now, so they map to the positive range `2147483648`...`4294967295` decimal.
327
325
--
328
326
+
329
-
Thus, in this range, and for 16 vs 16+ digits, prepending a mathematically insignificant 0 results in a different value.
327
+
Thus, for 8 vs 8+ digits, and for 16 vs 16+ digits, prepending a mathematically insignificant 0 results in a different value.
330
328
This is something to be aware of.
331
-
* Hex numbers between 0 0000 0001 ... 7FFF FFFF FFFF FFFF are all positive `BIGINT`.
332
-
* Hex numbers between 8000 0000 0000 0000 ... FFFF FFFF FFFF FFFF are all negative `BIGINT`.
333
-
* Hex numbers between 0 0000 0000 0000 0001 ... 7FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF are all positive `INT128`
334
-
* Hex numbers between 8000 0000 0000 0000 0000 0000 0000 0000 ... FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF are all negative `INT128`
329
+
* Hex numbers between `0 0000 0001`...`7FFF FFFF FFFF FFFF` are all positive `BIGINT`.
330
+
* Hex numbers between `8000 0000 0000 0000`...`FFFF FFFF FFFF FFFF` are all negative `BIGINT`.
331
+
* Hex numbers between `0 0000 0000 0000 0001`...`7FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` are all positive `INT128`
332
+
* Hex numbers between `8000 0000 0000 0000 0000 0000 0000 0000`...`FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` are all negative `INT128`
335
333
* A `SMALLINT` cannot be written in hex, strictly speaking, since even `0x0` and `0x1` are evaluated as `INTEGER`.
336
-
However, if you write a positive integer within the 16-bit range `0x0000` (decimal zero) to `0x7FFF` (decimal 32767) it will be converted to `SMALLINT` transparently.
334
+
However, if you write a positive integer within the 16-bit range `0x0000` (decimal `0`) to `0x7FFF` (decimal `32767`) it will be converted to `SMALLINT` transparently.
337
335
+
338
-
It is possible to write to a negative `SMALLINT` in hex, using a 4-byte hex number within the range `0xFFFF8000` (decimal -32768) to `0xFFFFFFFF` (decimal -1).
336
+
It is possible to write to a negative `SMALLINT` in hex, using a 4-byte hex number within the range `0xFFFF8000` (decimal `-32768`) to `0xFFFFFFFF` (decimal `-1`).
|Combines two or more predicates, each of which must be true for the entire predicate to be true
669
667
|2
670
668
671
-
|`OR`
669
+
|OR
672
670
|Combines two or more predicates, of which at least one predicate must be true for the entire predicate to be true
673
671
|3
674
672
|===
@@ -750,8 +748,8 @@ All other conditional expressions apply internal functions derived from `CASE` a
750
748
The `CASE` construct returns a single value from a number of possible values.
751
749
Two syntactic variants are supported:
752
750
753
-
* The _simple_{nbsp}``CASE``, comparable to a _case construct_ in Pascal or a _switch_ in C
754
-
* The _searched_{nbsp}``CASE``, which works like a series of "```if ... else if ... else if```"{nbsp}clauses.
751
+
* The <<langref-commons-conditional-case-simple,_simple_``CASE``>>, comparable to a _case construct_ in Pascal or a _switch_ in C
752
+
* The <<langref-commons-conditional-case-srched,_searched_``CASE``>>, which works like a series of "```if ... else if ... else if```"clauses.
755
753
756
754
[#langref-commons-conditional-case-simple]
757
755
===== Simple `CASE`
@@ -927,7 +925,7 @@ WHERE EXISTS
927
925
AND O.adate = DATE '10.03.1990');
928
926
----
929
927
930
-
When subqueries are used to get the values of the output column in the `SELECT` list, a subquery must return a _scalar_ result (see below).
928
+
When subqueries are used to get the values of the output column in the `SELECT` list, a subquery must return a <<langref-commons-scalarsq,_scalar_ result>>.
0 commit comments