Re: UUID/GUID discussion leading to request for hexstring bytea? (was: Re: TODO: GUID datatype)
От | Martijn van Oosterhout |
---|---|
Тема | Re: UUID/GUID discussion leading to request for hexstring bytea? (was: Re: TODO: GUID datatype) |
Дата | |
Msg-id | 20060907093505.GB10093@svana.org обсуждение исходный текст |
Ответ на | UUID/GUID discussion leading to request for hexstring bytea? (was: Re: TODO: GUID datatype) (mark@mark.mielke.cc) |
Ответы |
Looking at Postgres 8.2
|
Список | pgsql-hackers |
On Wed, Sep 06, 2006 at 05:05:47PM -0400, mark@mark.mielke.cc wrote: > 2) Create semi-generic types with common bitlengths. Associated > functions work on these semi-generic types. No overhead. > - hexstring128, hexstring160, ... > > 3) Create a new bytea type that has ascii input and output formats, > probably based around hexstrings. Overhead of 4 bytes. I think 3) is worthwhile for core, it would have many uses. But you don't actually need to have a new type for that, just new I/O functions. As for 2) I think would be acceptable for contrib to contain some code that demonstrates how to make fixed length types. It would be fairly straightforward to make a script where you give it a type name and a length and it'll spit out the code for that type. I don't think UUID specific stuff needs to be in core, though you could make an argument that the hex input/output functions should ignore dashes, to make it straightforward to store UUIDs directly in there. Hope this helps, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-hackers по дате отправления: