DSQL, PSQL
Added in
2.5
Syntax
Result type
CHAR(16) CHARACTER SET OCTETS
Description
Converts a human-readable 36-char UUID string to the corresponding 16-byte UUID.
Examples
select char_to_uuid('A0bF4E45-3029-2a44-D493-4998c9b439A3') from rdb$database
-- returns A0BF4E4530292A44D4934998C9B439A3 (16-byte string)
select char_to_uuid('A0bF4E45-3029-2A44-X493-4998c9b439A3') from rdb$database
-- have hex digit at position 20 instead of "X (ASCII 88)"
Available in
DSQL, PSQL
Syntax
Result type
CHAR(16) CHARACTER SET OCTETS
Description
Returns a universally unique ID as a 16-byte character string.
Example
select gen_uuid() from rdb$database
-- returns e.g. 017347BFE212B2479C00FA4323B36320 (16-byte string)
See also
DSQL, PSQL
Added in
2.5
Syntax
Parameter | Description |
---|---|
uuid | 16-byte UUID |
Result type
CHAR(36)
Description
Converts a 16-byte UUID to its 36-character, human-readable ASCII representation.
Examples
-- returns '876C45F4-569B-320D-BCB4-735AC3509E5F'
select uuid_to_char(gen_uuid()) from rdb$database
-- returns e.g. '680D946B-45FF-DB4E-B103-BB5711529B86'
-- returns '46697265-6269-7264-2073-77696E677321'