Re: MD5() function not available ??

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Marek Lewczuk <marek(dot)lewczuk(at)samar(dot)pl>
Cc: Lista dyskusyjna pgsql-general <pgsql-general(at)postgresql(dot)org>, Lista dyskusyjna pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: MD5() function not available ??
Date: 2003-09-14 05:12:31
Message-ID: Pine.LNX.4.44.0309140709400.31553-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Thu, 11 Sep 2003, Marek Lewczuk wrote:

> I've searched for MD5 crypting function in PG, but I did not find it.
> Anyone knows how to implement this function in PG ?

It's implemented in the pgcrypto module that is in contrib in the tarball.
Once you have added that you can for example do

dennis=# SELECT encode (digest ('the string', 'md5'), 'hex');
44d5a3f30f0328e0cf60cd275ed3aac9

--
/Dennis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Konstantin Goudkov 2003-09-14 07:04:10 Re: Temp tables and copy
Previous Message Cott Lang 2003-09-14 04:44:48 Re: best arrangement of 3 disks for (insert) performance

Browse pgsql-sql by date

  From Date Subject
Next Message Muhyiddin A.M Hayat 2003-09-14 06:49:58 Column Types
Previous Message Tom Lane 2003-09-14 04:38:42 Re: Use derived expression in select statement