In fact, there is an PostgreSQL FAQ item about encryption.
---------------------------------------------------------------------------
Bruce Momjian wrote:
> Christoph Dalitz wrote:
> > Date: Fri, 27 Dec 2002 10:01:30 -0500
> > From: "Campano, Troy" <Troy.Campano@LibertyMutual.com>
> > >
> > > Is there a PostgreSQL function that allows you to store passwords, but it encrypts them?
> > > If not, are there any recommendations for storing passwords?
> > >
> > The easiest solution would be a stored procedure written in C that simply
> > calls the crypt() function (for details: "man crypt"). In that case you will
> > also need to store the "salt" with the encrypted password.
> >
> > Even if you have not yet written any stored procedure, it should be done
> > in less than two hours. See the documentation on "server side programming" for details.
>
> Also, see /contrib/pgcrypto for encryption routines.
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman@candle.pha.pa.us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073