Oracle的SYS_GUID()UUID RFC 4122是否兼容? [英] Is Oracle's SYS_GUID() UUID RFC 4122 compliant?

查看:111
本文介绍了Oracle的SYS_GUID()UUID RFC 4122是否兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Oracle的SYS_GUID()函数是否返回兼容RFC 4122 UUID .例如:

I wonder if Oracle's SYS_GUID() function returns a RFC 4122 compliant UUID. For example:

SQL> select sys_guid() from dual;

SYS_GUID()
--------------------------------
A6C1BD5167C366C6E04400144FD25BA0

我知道SYS_GUID()返回16字节RAW数据类型. Oracle使用RAWTOHEX()并可能使用TO_CHAR()来打印上述ID.将此解释为符合UUID的字符串格式是否正确:

I know, that SYS_GUID() returns a 16 byte RAW datatype. Oracle uses RAWTOHEX() and probably TO_CHAR() to print out the above ID. Is it correct to interpret this as a UUID compliant string format like:

A6C1BD51-67C3-66C6-E044-00144FD25BA0

我认为它不符合RFC 4122标准,因为该定义指出,有效的UUID必须在UUID本身内命名UUID版本.

I think it's not compliant to the RFC 4122 standard, because the definition says, that a valid UUID must name the UUID-Version within the UUID itself.

符合RFC 4122的UUID(版本3)的语法:

Syntax for a RFC 4122 compliant UUID (Version 3):

xxxxxxxx-xxxx-3xxx-xxxx-xxxxxxxxxxxx

推荐答案

SYS_GUID是Oracle的UUID的等效.它是全球唯一的.但是,它不符合RFC 4122.我从文档(在Java XML文档之外)中未引用UUID来推断缺乏合规性.

SYS_GUID is Oracle's equivalent of UUID. It is globally unique. However, it is not compliant to RFC 4122; I'm inferring lack of compliance from the absence of references to UUID in the documentation (outside the Java XML documentation).

我怀疑Oracle尚未本地实施RFC 4122,因为他们认为它无法扩展.我无法想象为什么他们还会发明自己的东西而不遵守标准.

I suspect Oracle haven't natively implemented RFC 4122 because they don't think it scales. I can't imagine why else they would invent their own thing instead of complying to a standard.

这篇关于Oracle的SYS_GUID()UUID RFC 4122是否兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆