Re: [GENERAL] md5() sorting

2007-11-17 Thread Scott Marlowe
On Nov 12, 2007 1:53 PM, Lew <[EMAIL PROTECTED]> wrote: > Karsten Hilbert wrote: > > On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: > > > I'm wondering if you cast the md5sum as a bytea instead of text and > then sort, if that would solve it simply. > >>> Along the lines of

Re: [GENERAL] md5() sorting

2007-11-17 Thread Lew
Karsten Hilbert wrote: On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: I'm wondering if you cast the md5sum as a bytea instead of text and then sort, if that would solve it simply. Along the lines of ... ORDER BY decode(md5('...'), 'hex'); Maybe using digest(.., 'md5')

Re: [GENERAL] md5() sorting

2007-11-07 Thread Marko Kreen
On 11/7/07, Karsten Hilbert <[EMAIL PROTECTED]> wrote: > On Wed, Nov 07, 2007 at 03:54:02PM +0100, Martijn van Oosterhout wrote: > > > Should I be going about this sorting or hashing or detection > > > business in another way entirely which can be done at the > > > SQL level ? > > > > I'm wonder

Re: [GENERAL] md5() sorting

2007-11-07 Thread Karsten Hilbert
On Wed, Nov 07, 2007 at 05:36:47PM +0200, Marko Kreen wrote: > > > I'm wondering if you cast the md5sum as a bytea instead of text and > > > then sort, if that would solve it simply. > > > > Along the lines of > > > > ... ORDER BY decode(md5('...'), 'hex'); > > > Maybe using digest(.., 'md

Re: [GENERAL] md5() sorting

2007-11-07 Thread Martijn van Oosterhout
On Wed, Nov 07, 2007 at 03:42:11PM +0100, Karsten Hilbert wrote: > Should I be going about this sorting or hashing or detection > business in another way entirely which can be done at the > SQL level ? I'm wondering if you cast the md5sum as a bytea instead of text and then sort, if that would

Re: [GENERAL] md5() sorting

2007-11-07 Thread Karsten Hilbert
On Wed, Nov 07, 2007 at 03:54:02PM +0100, Martijn van Oosterhout wrote: > > Should I be going about this sorting or hashing or detection > > business in another way entirely which can be done at the > > SQL level ? > > I'm wondering if you cast the md5sum as a bytea instead of text and > then