X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3A9A354018 for ; Thu, 12 May 2005 18:01:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90177-08 for ; Thu, 12 May 2005 21:01:21 +0000 (GMT) Received: from cheech.nmsu.edu (cheech.nmsu.edu [128.123.34.14]) by svr1.postgresql.org (Postfix) with ESMTP id C973A53635 for ; Thu, 12 May 2005 18:01:17 -0300 (ADT) Received: (from nobody@localhost) by cheech.nmsu.edu (8.11.6/8.11.6) id j4CL1HD22790 for pgsql-sql@postgresql.org; Thu, 12 May 2005 15:01:17 -0600 Received: from 128.123.95.40 ( [128.123.95.40]) as user subhash@imap.nmsu.edu by webmail.nmsu.edu with HTTP; Thu, 12 May 2005 15:01:17 -0600 Message-ID: <1115931677.4283c41db0689@webmail.nmsu.edu> Date: Thu, 12 May 2005 15:01:17 -0600 From: subhash@nmsu.edu To: pgsql-sql@postgresql.org Subject: md5 in pg_shadow? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.0 X-Originating-IP: 128.123.95.40 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.283 tagged_above=0 required=5 tests=AWL, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200505/95 X-Sequence-Number: 21408 Hi, I was trying to write a function to validate the username and its password in the pg_shadow table. The function should take in the username and password as arguments and see if it matches with those in the pg_shadow table. But the md5 hashed password in pg_shadow doesnot match with what i get when i do select 'md5' || md5('some_password'); Is there a function already present to do this or how can i get the same hashed password that i get in pg_shadow so i can write my own function? Please help me out on this. Thanks, Subhash.