*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.187 2009/06/21 20:15:32 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.188 2009/06/24 13:39:42 mha Exp $
*
*-------------------------------------------------------------------------
*/
char errstr[100];
pg_regerror(r, &re, errstr, sizeof(errstr));
- ereport(ERROR,
+ ereport(LOG,
(errcode(ERRCODE_INVALID_REGULAR_EXPRESSION),
errmsg("invalid regular expression \"%s\": %s", file_ident_user + 1, errstr)));
{
/* REG_NOMATCH is not an error, everything else is */
pg_regerror(r, &re, errstr, sizeof(errstr));
- ereport(ERROR,
+ ereport(LOG,
(errcode(ERRCODE_INVALID_REGULAR_EXPRESSION),
errmsg("regular expression match for \"%s\" failed: %s", file_ident_user + 1, errstr)));
*error_p = true;
{
/* substitution of the first argument requested */
if (matches[1].rm_so < 0)
- ereport(ERROR,
+ {
+ ereport(LOG,
(errcode(ERRCODE_INVALID_REGULAR_EXPRESSION),
errmsg("regular expression \"%s\" has no subexpressions as requested by backreference in \"%s\"",
file_ident_user + 1, file_pgrole)));
+ pg_regfree(&re);
+ *error_p = true;
+ return;
+ }
/*
* length: original length minus length of \1 plus length of match