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

2009-07-30 Thread Peter Eisentraut
On Wednesday 29 July 2009 20:16:48 decibel wrote: bytea doesn't cast well to and from text when you're dealing with hex data; you end up using the same amount of space as a varchar. What would probably work well is a hex datatype that internally works like bytea but requires that the input

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

2009-07-29 Thread decibel
On Jul 28, 2009, at 6:15 AM, Peter Eisentraut wrote: On Monday 27 July 2009 14:50:30 Alvaro Herrera wrote: 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

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

2009-07-28 Thread Peter Eisentraut
On Monday 27 July 2009 14:50:30 Alvaro Herrera wrote: 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.

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

2009-07-28 Thread Merlin Moncure
On Tue, Jul 28, 2009 at 7:15 AM, Peter Eisentrautpete...@gmx.net wrote: On Monday 27 July 2009 14:50:30 Alvaro Herrera wrote: 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

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

2009-07-27 Thread Alvaro Herrera
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

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

2009-07-27 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: 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

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

2009-07-27 Thread Merlin Moncure
On Mon, Jul 27, 2009 at 10:20 AM, Tom Lanet...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: 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

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

2009-07-27 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Mon, Jul 27, 2009 at 10:20 AM, Tom Lanet...@sss.pgh.pa.us wrote: Wasn't this proposed and rejected before?  (Or more to the point, why'd you bother?  The advantage over bytea seems negligible.) well, one nice things about the fixed length types is

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

2009-07-27 Thread Andrew Dunstan
Merlin Moncure wrote: On Mon, Jul 27, 2009 at 10:20 AM, Tom Lanet...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: We've developed some code to implement fixed-length datatypes for well known digest function output (MD5, SHA1 and the various SHA2 types).

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

2009-07-27 Thread Merlin Moncure
On Mon, Jul 27, 2009 at 12:02 PM, Andrew Dunstanand...@dunslane.net wrote: Merlin Moncure wrote: On Mon, Jul 27, 2009 at 10:20 AM, Tom Lanet...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: We've developed some code to implement fixed-length datatypes for well