summaryrefslogtreecommitdiff
path: root/contrib/chkpass/chkpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/chkpass/chkpass.c')
-rw-r--r--contrib/chkpass/chkpass.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/chkpass/chkpass.c b/contrib/chkpass/chkpass.c
index b4429adac0..4cd67ea75e 100644
--- a/contrib/chkpass/chkpass.c
+++ b/contrib/chkpass/chkpass.c
@@ -4,7 +4,7 @@
* darcy@druid.net
* http://www.druid.net/darcy/
*
- * $Id: chkpass.c,v 1.9 2002/10/26 15:00:59 tgl Exp $
+ * $Id: chkpass.c,v 1.10 2003/07/24 17:52:12 tgl Exp $
* best viewed with tabs set to 4
*/
@@ -84,8 +84,10 @@ chkpass_in(PG_FUNCTION_ARGS)
if (verify_pass(str) != 0)
{
- elog(ERROR, "chkpass_in: purported CHKPASS \"%s\" is a weak password",
- str);
+ ereport(ERROR,
+ (errcode(ERRCODE_DATA_EXCEPTION),
+ errmsg("password \"%s\" is weak", str)));
+
PG_RETURN_POINTER(NULL);
}