X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 43420D1B509 for ; Thu, 13 Nov 2003 02:15:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 25778-01 for ; Wed, 12 Nov 2003 22:14:45 -0400 (AST) Received: from localhost.localdomain (m208-10.dsl.rawbw.com [198.144.208.10]) by svr1.postgresql.org (Postfix) with ESMTP id 01CDDD1B521 for ; Wed, 12 Nov 2003 22:14:41 -0400 (AST) Received: from localhost.localdomain (whoville [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id hAD2Eh3D005825; Wed, 12 Nov 2003 18:14:43 -0800 Received: (from rkh@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id hAD2Ehxn005823; Wed, 12 Nov 2003 18:14:43 -0800 X-Authentication-Warning: localhost.localdomain: rkh set sender to reece@in-machina.com using -f Subject: Re: 7.4RC2: pg_crypto not working? From: Reece Hart To: pgsql-admin@postgresql.org, Murthy Kambhampaty In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC09248D@THOR.goeci.com> References: <2D92FEBFD3BE1346A6C397223A8DD3FC09248D@THOR.goeci.com> Content-Type: multipart/alternative; boundary="=-UAOCWTQ6+zkPPQyrkmgs" Message-Id: <1068689683.5532.36.camel@whoville> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 12 Nov 2003 18:14:43 -0800 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/225 X-Sequence-Number: 11212 --=-UAOCWTQ6+zkPPQyrkmgs Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 2003-11-12 at 14:14, Murthy Kambhampaty wrote: > Is this from user error or is pgcrypto not working yet in RC2? It works for me (x86, redhat 7.3, linux 2.4.18). I did make install in pgcrypto/, then: CREATE FUNCTION digest (text, text) RETURNS bytea AS 'pgcrypto', 'pg_digest' LANGUAGE c STRICT; Note that I don't have '$libdir/' in this function definition. I can't remember why. compbio@csb-dev=# select encode( digest('AAA','md5'), 'hex' ); encode ---------------------------------- e1faffb3e614e6c2fba74296962386b7 (1 row) compbio@csb-dev=# select version(); version -------------------------------------------------------------- PostgreSQL 7.4RC2 on i686-pc-linux-gnu, compiled by GCC 2.96 I just discovered that md5 is now built in to the 7.4 backend, so I don't need pgcrypto anymore. -Reece -- Reece Hart, http://www.in-machina.com/~reece/, GPG:0x25EC91A0 0xD178AAF9 --=-UAOCWTQ6+zkPPQyrkmgs Content-Type: text/html; charset=utf-8 On Wed, 2003-11-12 at 14:14, Murthy Kambhampaty wrote:
Is this from user error or is pgcrypto not working yet in RC2?

It works for me (x86, redhat 7.3, linux 2.4.18). I did make install in pgcrypto/, then:

CREATE FUNCTION digest (text, text) RETURNS bytea
    AS 'pgcrypto', 'pg_digest'
    LANGUAGE c STRICT;

Note that I don't have '$libdir/' in this function definition. I can't remember why.

compbio@csb-dev=# select encode( digest('AAA','md5'), 'hex' );
              encode
----------------------------------
e1faffb3e614e6c2fba74296962386b7
(1 row)

compbio@csb-dev=# select version();
                           version
--------------------------------------------------------------
PostgreSQL 7.4RC2 on i686-pc-linux-gnu, compiled by GCC 2.96


I just discovered that md5 is now built in to the 7.4 backend, so I don't need pgcrypto anymore.


-Reece

-- 
Reece Hart, http://www.in-machina.com/~reece/, GPG:0x25EC91A0 0xD178AAF9
--=-UAOCWTQ6+zkPPQyrkmgs--