[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 pgcry

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

2009-07-27 Thread Tom Lane
Alvaro Herrera 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 wondering about proposin

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 Lane wrote: > Alvaro Herrera 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 >> btr

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

2009-07-27 Thread Tom Lane
Merlin Moncure writes: > On Mon, Jul 27, 2009 at 10:20 AM, Tom Lane 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 that you can > keep your table

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 Lane wrote: Alvaro Herrera 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 c

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 Dunstan wrote: > Merlin Moncure wrote: >> >> On Mon, Jul 27, 2009 at 10:20 AM, Tom Lane wrote: >> >>> >>> Alvaro Herrera writes: >>> We've developed some code to implement fixed-length datatypes for well known digest function output (MD5, SHA

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 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

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 quite

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