Received: from mail.xnet.com (quake.xnet.com [198.147.221.67]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA37788 for ; Sat, 27 May 2000 03:22:37 -0400 (EDT) (envelope-from selkovjr@selkovjr.xnet.com) Received: from selkovjr.xnet.com ([204.248.57.203]) by mail.xnet.com (8.9.3+Sun/XNet-3.0R) with ESMTP id CAA03709; Sat, 27 May 2000 02:22:32 -0500 (CDT) Message-Id: <200005270722.CAA03709@mail.xnet.com> To: ohp@pyrenet.fr cc: pgsql-sql@postgresql.org From: selkovjr@mcs.anl.gov Reply-to: selkovjr@mcs.anl.gov Subject: Re: New Type In-reply-to: References: Comments: In-reply-to Olivier PRENANT message dated "Fri, 26 May 2000 22:03:56 +0200." Date: Sat, 27 May 2000 02:22:32 -0500 X-Archive-Number: 200005/172 > Hi all, > > I'm trying to create a type password; the goal is to have a table like: > > CREATE TABLE test ( > username varchar, > pass passwd); > > insert into test values ('me','secret'); > > and have "secret" being automagicly crypted. > > What I want is to mimic the PASSWORD function of mysql but much better, > not having to call a function. > > I just can't figure how to write the xx_crypt(opaque) returns opaque > function. > > Any help available??? Yes. Send me your code as a function that runs in a.out, I will convert it. You will get in a form suitable for use as a contrib. You will then be on your own. I'll do it in a split-second, but give me a day or two to respond; I am moving and can't read my mail often enough. --Gene