Does Firebird support UUIDs or GUIDs?
Not directly in the engine, but you can use some UDF library like uuidlib or FreeAdhocUDF:
http://www.udf.adhoc-data.de/index_eng.html
To store such values, BIGINT is not enough as UUIDs are 128bit, while the biggest available integer is 64bit (8bytes), so you're best off using some CHAR(16) or bigger CHAR datatype. Please note that the shorter the storage type, the faster will the indexing work. It is recommended to use the OCTETS as character set for that column, as it means to store raw bytes and only wastes a single byte (8 bits) per character.
GUID is a Microsoft standard and implementations exists for various Windows development tools. UUID is Unix standard, and you can use it anywhere. Please note that codes are not always interchangeable (depending on the implementation you use).
http://www.ietf.org/rfc/rfc4122.txt
Here's an example of Delphi UDF you can use:
function gen_uuid: PChar; cdecl; export;
var
uid: TGUID;
begin
Result := ib_util_malloc(16);
CreateGUID(uid);
Move(uid, Result^, SizeOf(uid));
end;
Register it like this:
declare external function gen_uuid
returns char(16) character set octets free_it
entry_point 'gen_uuid' module_name 'udf.dll';





The Firebird FAQ