[RFC] new digest datatypes, or generic fixed-len hex types?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема [RFC] new digest datatypes, or generic fixed-len hex types?
Дата
Msg-id 20090727115030.GA6459@alvh.no-ip.org
обсуждение исходный текст
Ответы Re: [RFC] new digest datatypes, or generic fixed-len hex types?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [RFC] new digest datatypes, or generic fixed-len hex types?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Hi,

We've developed some code to implement fixed-length datatypes for well
known digest function output (MD5, SHA1 and the various SHA2 types).
These types have minimal overhead and are quite complete, including
btree and hash opclasses.

We're wondering about proposing them for inclusion in pgcrypto.  I asked
Marko Kreen but he is not sure about it; according to him it would be
better to have general fixed-length hex types.  (I guess it would be
possible to implement the digest types as domains over those.)

So basically we have sha1, sha-256, sha-512 etc on one hand, and hex8,
hex16, hex32 on the other hand.  In both cases there is a single body of
code that is compiled with a macro definition that provides the data
length for every separate case.  (Actually in the digest code we
refactored the common routines so that each type has a light wrapper
calling a function that works on any length; this could also be done to
the fixed-len hex code as well -- that code is pretty grotty at the
moment.)

Of these two choices, which one is likely to have better acceptance
around here?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: query - change in gistentryinit between 8.1 and 8.2
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5