In Vertica 9.0, you can use the UUID_GENERATE function to generate a new GUID value.
Note that this function generates a totally random UUID, which has a slightly higher chance of not being unique, compared to one generated using the rules in RFC-4112. See this blog post for more information, including a way to get Linux to generate a UUID for you when using vsql.
Sorry, that function was introduced in version 9.0. If you look at the blog post, however, there is a way to get a UUID generated by Linux into Vertica using vsql. Another possibility (if you know how to program, or know someone who can) is to use the Vertica SDK to create a UDSF that generates a UUID for you.
Comments
In Vertica 9.0, you can use the UUID_GENERATE function to generate a new GUID value.
Note that this function generates a totally random UUID, which has a slightly higher chance of not being unique, compared to one generated using the rules in RFC-4112. See this blog post for more information, including a way to get Linux to generate a UUID for you when using vsql.
Hi, GaryG
I use the Vertica v7.2.1-0, I can't found the function.
Sorry, that function was introduced in version 9.0. If you look at the blog post, however, there is a way to get a UUID generated by Linux into Vertica using vsql. Another possibility (if you know how to program, or know someone who can) is to use the Vertica SDK to create a UDSF that generates a UUID for you.
thanks, GaryG