Re: [GENERAL] password management

2010-05-07 Thread Christophe Dore
Hi IMHO, you should never store password in clear If you store the last 5 crypted passwords, then you can make it comparing the new password, crypted, to those 5 strings. Regards -- Christophe Doré Implementation Product Manager 3 rue Marcel Allegot 92190 Meudon, France +33

Re: [GENERAL] password management

2010-05-06 Thread Craig Ringer
On 7/05/2010 12:01 PM, Craig Ringer wrote: craig=> create or replace function extract_salt(text) returns text as $$ craig$> select (regexp_matches($1, E'^(\\$[^\\$]+\\$[^\\$]+)\\$'))[1]; craig$> $$ language sql immutable; Upon re-reading the pgcrypto documentation I see that this is unnecessar

Re: [GENERAL] password management

2010-05-06 Thread Craig Ringer
On 7/05/2010 2:31 AM, akp geek wrote: Dear all - I am writing function to handle the passwords. Currently the crypt is being used to store the password in the database. what I need to do is, when the user wants to change the password, I need to check if that password is not being

[GENERAL] password management

2010-05-06 Thread akp geek
Dear all - I am writing function to handle the passwords. Currently the crypt is being used to store the password in the database. what I need to do is, when the user wants to change the password, I need to check if that password is not being used before up to 5 times, If not then t