From: | Bertram Scharpf <lists(at)bertram-scharpf(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Password encryption method |
Date: | 2007-01-19 08:31:49 |
Message-ID: | 20070119083149.GA582@bart.bertram-scharpf.homelinux.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
looking at the source code I find out that this works:
sandbox=# create role joe login password 'verysecret';
CREATE ROLE
sandbox=# create function validate_user_8_1(text,text) returns boolean immutable language 'sql' as $$ select 'md5'||md5($2||$1) = rolpassword from pg_authid where rolname=$1; $$;
CREATE FUNCTION
sandbox=# select validate_user_8_1('joe','verysecret');
validate_user_8_1
-------------------
t
(1 Zeile)
May I rely on this in future versions or are there more
sophisticated ways to do it?
Thanks in advance,
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-01-19 08:34:58 | Re: Can't use passwords for users |
Previous Message | Richard Huxton | 2007-01-19 08:24:16 | Re: Installation of PostgreSQL Service under admin account |