Skip site navigation (1) Skip section navigation (2)

New Type

From: Olivier PRENANT <ohp(at)pyrenet(dot)fr>
To: pgsql-hackers(at)posgresql(dot)org
Cc: pgsql-sql(at)postgresql(dot)org
Subject: New Type
Date: 2000-05-26 20:03:56
Message-ID: Pine.UW2.4.21.0005262158330.4093-100000@server.pyrenet.fr (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
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???

TIA

-- 
Olivier PRENANT         	Tel:	+33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


Responses

pgsql-hackers by date

Next:From: Mikheev, VadimDate: 2000-05-26 21:04:49
Subject: RE: Berkeley DB...
Previous:From: Zeugswetter AndreasDate: 2000-05-26 20:01:55
Subject: Re: Any reason to use pg_dumpall on an idle database

pgsql-sql by date

Next:From: Gabriel RussellDate: 2000-05-26 21:24:51
Subject: is limit a reserved keyword?
Previous:From: Zeugswetter AndreasDate: 2000-05-26 19:47:38
Subject: Re: Re: [SQL] aliases break my query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group