summaryrefslogtreecommitdiff
path: root/contrib/chkpass
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-24 17:52:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-24 17:52:50 +0000
commit8fd5b3ed67d91937516d855bd6f225052aa88f2a (patch)
tree5f14c30cb79692b6d35e612ed97feb79f62a155d /contrib/chkpass
parentf0c5384d4a21d85198f86281f61d5754bfdca7a5 (diff)
downloadpostgresql-8fd5b3ed67d91937516d855bd6f225052aa88f2a.tar.gz
Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)
Diffstat (limited to 'contrib/chkpass')
-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);
}