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