postgresql/contrib/uuid-ossp
Tom Lane e55ccb3b17 Reject bogus output from uuid_create(3).
When using the BSD UUID functions, contrib/uuid-ossp expects
uuid_create() to produce a version-1 UUID.  FreeBSD still does so,
but in recent NetBSD releases that function produces a version-4
(random) UUID instead.  That's not acceptable for our purposes:
if the user wanted v4 she would have asked for v4, not v1.
Hence, check the version digit and complain if it's not '1'.

Also drop the documentation's claim that the NetBSD implementation
is usable.  It might be, depending on which OS version you're using,
but we're not going to get into that kind of detail.

(Maybe someday we should ditch all these external libraries
and just write our own UUID code, but today is not that day.)

Nazir Bilal Yavuz, with cosmetic adjustments and docs by me.
Backpatch to all supported versions.

Discussion: https://postgr.es/m/3848059.1661038772@sss.pgh.pa.us
Discussion: https://postgr.es/m/17358-89806e7420797025@postgresql.org
2022-09-09 12:41:36 -04:00
..
expected Fix uuid-ossp regression tests based on buildfarm feedback. 2014-05-28 23:15:51 -04:00
sql Fix uuid-ossp regression tests based on buildfarm feedback. 2014-05-28 23:15:51 -04:00
.gitignore Introduce SHA1 implementations in the cryptohash infrastructure 2021-01-23 11:33:04 +09:00
Makefile Introduce SHA1 implementations in the cryptohash infrastructure 2021-01-23 11:33:04 +09:00
uuid-ossp--1.0--1.1.sql Update uuid-ossp extension for parallel query. 2016-06-14 14:56:21 -04:00
uuid-ossp--1.1.sql Update uuid-ossp extension for parallel query. 2016-06-14 14:56:21 -04:00
uuid-ossp.c Reject bogus output from uuid_create(3). 2022-09-09 12:41:36 -04:00
uuid-ossp.control Mark some contrib modules as "trusted". 2020-02-13 15:02:35 -05:00