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
IvorySQL's sys_guid() is a powerful random number generation function that generates and returns a 16-byte database-level unique identifier (raw value).
11
+
12
+
== Implementation Description
13
+
14
+
The sys_guid() function of IvorySQL is implemented by modifying the code of the uuid-ossp plugin. To make full use of various underlying libraries of uuid, the following logic is adopted:
15
+
16
+
1. If the uuid-ossp exists in the system, uuid_make() will be used;
17
+
2. If the uuid-e2fs exists in the system, uuid_generate_random() will be used;
18
+
3. Otherwise use arc4random();
19
+
20
+
Meanwhile modify the code so that IvorySQL can load uuid-ossp extension automatically.
IvorySQL's sys_guid() is a powerful random number generation function that generates and returns a 16-byte database-level unique identifier (raw value).
11
+
12
+
== Usage example
13
+
14
+
```
15
+
highgo=# select sys_guid() from dual;
16
+
sys_guid
17
+
------------------------------------
18
+
\x3ed9426c8a093442a38bea09a74f44a1
19
+
(1 row)
20
+
```
21
+
22
+
== The sys_guid function can generate default values for primary keys when creating a table
0 commit comments