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.