Re: configure --with-uuid=bsd fails on NetBSD
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2022-09-09T16:48:38Z
Lists: pgsql-hackers
Nazir Bilal Yavuz <byavuz81@gmail.com> writes: > I updated my patch. I checked version field in 'uuid_generate_internal' > function instead of checking it in 'uuid_generate_v1' and > 'uuid_generate_v1mc' functions, but I have some questions: Yeah, that seems like the right place. I tweaked the code to check strbuf not str just so we aren't making unnecessary assumptions about the length of what is returned. strbuf[14] is guaranteed to exist, str[14] maybe not. > 1 - Should it be checked only for '--with-uuid=bsd' option? > 1.1 - If it is needed to be checked only for '--with-uuid=bsd', > should just NetBSD be checked? I don't see any reason not to check in the BSD code path --- it's a cheap enough test. On the other hand, in the other code paths there is no evidence that it's necessary, and we'd find out soon enough if it becomes necessary. > 2 - Should it error out without including current UUID version in the > error message? General error message could mask if the 'uuid_create' > function starts to produce UUIDs other than version-4. Yeah, I thought reporting the actual version digit was worth doing, and made it do so. Pushed with those changes and doc updates. I did not push the variant expected-file. I think the entire point here is that we are *not* deeming the new NetBSD implementation acceptable, so allowing it to pass regression tests is the wrong thing. regards, tom lane
Commits
-
Reject bogus output from uuid_create(3).
- e55ccb3b179c 14.6 landed
- c4b6d218e369 16.0 landed
- a61095aa7946 13.9 landed
- 95028d9de422 10.23 landed
- 4d3f54bd7a0d 11.18 landed
- 23fe89a61223 12.13 landed
- 100a8ca2c285 15.0 landed