use md5 function in a trigger when insert data
or see this link
http://www.postgresql.org/docs/8.3/static/pgcrypto.html
--- On Mon, 7/28/08, Chris Preston <chris@thetrafalgartravel.com> wrote:
> From: Chris Preston <chris@thetrafalgartravel.com>
> Subject: [SQL] Encrytion in postgres field in table
> To: pgsql-sql@postgresql.org
> Date: Monday, July 28, 2008, 1:25 PM
> How do I setup a password table that I only want to encrypt
> 1 field
> "password"