Re: [PATCH] Implement uuid_version()
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Jose Luis Tallon <jltallon@adv-solutions.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-13T06:31:58Z
Lists: pgsql-hackers
Hello Jose, > Got it, and done. Please find attached a v2 patch with the upgrade script > included. Patch v2 applies cleanly. Compiles cleanly (once running configure --with-uuid=...). Local make check ok. Doc build ok. There are no tests, I'd suggest to add some under sql & change expected if possible which would return all possible values, including with calling pg_random_uuid() which should return 4. Documentation describes uuid_version(), should it not describe uuid_version(namespace uuid)? I'd suggest to add an example. The extension update script seems ok, but ISTM that "uuid-ossp-1.1.sql" should be replaced with an updated "uuid-ossp-1.2.sql". -- Fabien.
Commits
-
Add gen_random_uuid function
- 5925e5549890 13.0 landed
-
Add a 64-bit hash function for type hstore.
- eb6f29141bed 12.0 cited