UUID_TO_CHAR()

<<UPPER() | FB 2.5 Language Reference | External functions >>

UUID_TO_CHAR()

Available in: DSQL, PSQL

Added in: 2.5

Description

Converts a 16-byte UUID to its 36-character, human-readable ASCII representation.

Result type: CHAR(36)

Syntax

 UUID_TO_CHAR (uuid)

 uuid ::= a string consisting of 16 single-byte characters

Examples

 select uuid_to_char(x'876C45F4569B320DBCB4735AC3509E5F') from rdb$database
 -- returns '876C45F4-569B-320D-BCB4-735AC3509E5F'

 select uuid_to_char(gen_uuid()) from rdb$database
 -- returns e.g. '680D946B-45FF-DB4E-B103-BB5711529B86'

 select uuid_to_char('Firebird swings!') from rdb$database
 -- returns '46697265-6269-7264-2073-77696E677321'

See also:
CHAR_TO_UUID()
GEN_UUID()

back to top of page
<<UPPER() | FB 2.5 Language Reference | External functions >>