Nazir Bilal Yavuz <byavuz81@gmail.com> writes:
> Based on these discussions, I attached a patch.
This is the wrong way to go about it:
+#if defined(__NetBSD__)
+ ereport(ERROR, errmsg("NetBSD's uuid_create function generates "
+ "version-4 UUIDs instead of version-1"));
+#endif
Older versions of NetBSD generated v1, so you'd incorrectly break
things on those. And who knows whether they might reconsider
in the future?
I think the right fix is to call uuid_create and then actually check
the version field of the result. This avoids breaking what need not
be broken, and it'd also guard against comparable problems on other
platforms (so don't blame NetBSD specifically in the message, either).
regards, tom lane