Search Postgresql Archives

Re: md5() sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 sort, if that would solve it simply.

Along the lines of

	... ORDER BY decode(md5('...'), 'hex');

? I knew I'd ask here ;-)

BTW, my Google Fu was lacking or I'd have found this earlier:

	http://www.varlena.com/GeneralBits/21.php
	(see middle of page)

Thanks,
Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux