Re: configure --with-uuid=bsd fails on NetBSD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: configure --with-uuid=bsd fails on NetBSD
Дата
Msg-id 1926640.1661530896@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: configure --with-uuid=bsd fails on NetBSD  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Ответы Re: configure --with-uuid=bsd fails on NetBSD  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: standby promotion can create unreadable WAL
Следующее
От: Robert Haas
Дата:
Сообщение: Re: postgres_fdw hint messages