Password encryption method - Mailing list pgsql-general

From Bertram Scharpf
Subject Password encryption method
Date
Msg-id 20070119083149.GA582@bart.bertram-scharpf.homelinux.com
Whole thread Raw
Responses Re: Password encryption method
Re: Password encryption method
List 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

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Installation of PostgreSQL Service under admin account
Next
From: Richard Huxton
Date:
Subject: Re: Can't use passwords for users