SQL concat and concatenate symbol '||' extension for BLOB data type

The concat SQL-function, concatenate operator ‘||’ and associated group function concat have been extended to allow concatenation of BLOBs in addition to concatenation for texts or types that can be cast to a text. Concatenation of objects with the BLOB data type takes place from left to right, on both Big and Little Endian architectures.

For example, the following SQL-expression constructs a random BLOB of 32 bytes:

select random_blob(16) || random_blob(16)

Another example is to create a table combining two BLOB columns from another table:

create or replace table t
as
select blob_column || another_blob newblob
from   src

The newblob column also will have the BLOB data type.

Identical to concatenation of large quantities of texts, the concatenation of many BLOBs has been optimized to reduce runtime and stack usage. The maximum supported size of the BLOB data type remains 2 GB.

Availability

The use of BLOB parameters with concat is available starting release 22.0.630 and BETA release 22.1.190.