Re: dfmgr additional ABI version fields - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: dfmgr additional ABI version fields
Date
Msg-id 615F26B6.1020805@anastigmatix.net
Whole thread Raw
In response to Re: dfmgr additional ABI version fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: dfmgr additional ABI version fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 10/07/21 12:42, Tom Lane wrote:

> Can we make the addition be a string not a number, so that we
> could include something more useful than "1234" in the error
> message?

I was wondering the same thing, just to sidestep the "who hands out IDs"
question.

Just using a string like "EDB v" + something would probably rule out
collisions in practice. To be more formal about it, something like
the tag URI scheme [0] could be recommended. Nothing at runtime would
have to know or care about tag URI syntax; it would just match a string
with a fixed opaque prefix and some suffix. The scheme gives the developer
an easy way to construct a meaningful and reliably non-colliding string.

Surely loading libraries isn't a hot enough operation to begrudge
a strcmp.

Regards,
-Chap


[0] https://datatracker.ietf.org/doc/html/rfc4151



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: storing an explicit nonce
Next
From: Stephen Frost
Date:
Subject: Re: storing an explicit nonce