Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
184fb14b
Commit
184fb14b
authored
24 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Make regular-expression error messages a tad less obscure,
per gripe from Josh Berkus.
parent
c41536ea
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/backend/regex/regerror.c
+11
-10
11 additions, 10 deletions
src/backend/regex/regerror.c
src/backend/regex/regex.3
+4
-4
4 additions, 4 deletions
src/backend/regex/regex.3
src/backend/utils/adt/regexp.c
+2
-2
2 additions, 2 deletions
src/backend/utils/adt/regexp.c
with
17 additions
and
16 deletions
src/backend/regex/regerror.c
+
11
−
10
View file @
184fb14b
...
@@ -59,10 +59,11 @@ static struct rerr
...
@@ -59,10 +59,11 @@ static struct rerr
{
{
{
{
REG_NOMATCH
,
"REG_NOMATCH"
,
"regexec() failed to match"
/* NOMATCH is not really an error condition, it just says no match */
REG_NOMATCH
,
"REG_NOMATCH"
,
"no pattern match found"
},
},
{
{
REG_BADPAT
,
"REG_BADPAT"
,
"invalid reg
ular expression
"
REG_BADPAT
,
"REG_BADPAT"
,
"invalid reg
ex struct
"
},
},
{
{
REG_ECOLLATE
,
"REG_ECOLLATE"
,
"invalid collating element"
REG_ECOLLATE
,
"REG_ECOLLATE"
,
"invalid collating element"
...
@@ -77,28 +78,28 @@ static struct rerr
...
@@ -77,28 +78,28 @@ static struct rerr
REG_ESUBREG
,
"REG_ESUBREG"
,
"invalid backreference number"
REG_ESUBREG
,
"REG_ESUBREG"
,
"invalid backreference number"
},
},
{
{
REG_EBRACK
,
"REG_EBRACK"
,
"brackets
(
[ ]
)
not balanced"
REG_EBRACK
,
"REG_EBRACK"
,
"brackets [ ] not balanced"
},
},
{
{
REG_EPAREN
,
"REG_EPAREN"
,
"parentheses not balanced"
REG_EPAREN
,
"REG_EPAREN"
,
"parentheses
( )
not balanced"
},
},
{
{
REG_EBRACE
,
"REG_EBRACE"
,
"braces not balanced"
REG_EBRACE
,
"REG_EBRACE"
,
"braces
{ }
not balanced"
},
},
{
{
REG_BADBR
,
"REG_BADBR"
,
"invalid repetition count(s)"
REG_BADBR
,
"REG_BADBR"
,
"invalid repetition count(s)
in { }
"
},
},
{
{
REG_ERANGE
,
"REG_ERANGE"
,
"invalid character range"
REG_ERANGE
,
"REG_ERANGE"
,
"invalid character range
in [ ]
"
},
},
{
{
REG_ESPACE
,
"REG_ESPACE"
,
"out of memory"
REG_ESPACE
,
"REG_ESPACE"
,
"
ran
out of memory"
},
},
{
{
REG_BADRPT
,
"REG_BADRPT"
,
"
repetition-operator
operand invalid"
REG_BADRPT
,
"REG_BADRPT"
,
"
?, *, or +
operand invalid"
},
},
{
{
REG_EMPTY
,
"REG_EMPTY"
,
"empty
(
sub
)
expression"
REG_EMPTY
,
"REG_EMPTY"
,
"empty
expression or
subexpression"
},
},
{
{
REG_ASSERT
,
"REG_ASSERT"
,
"
\"
can't happen
\"
-- you found a bug"
REG_ASSERT
,
"REG_ASSERT"
,
"
\"
can't happen
\"
-- you found a bug"
...
...
This diff is collapsed.
Click to expand it.
src/backend/regex/regex.3
+
4
−
4
View file @
184fb14b
...
@@ -464,11 +464,11 @@ include the following:
...
@@ -464,11 +464,11 @@ include the following:
.PP
.PP
.nf
.nf
.ta \w'REG_ECOLLATE'u+3n
.ta \w'REG_ECOLLATE'u+3n
REG_NOMATCH
regexec() failed to match
REG_NOMATCH
no pattern match found
REG_BADPAT invalid reg
ular expression
REG_BADPAT invalid reg
ex struct
REG_ECOLLATE invalid collating element
REG_ECOLLATE invalid collating element
REG_ECTYPE invalid character class
REG_ECTYPE invalid character class
REG_EESCAPE
\e applied to unescapable character
REG_EESCAPE
trailing backslash (\e)
REG_ESUBREG invalid backreference number
REG_ESUBREG invalid backreference number
REG_EBRACK brackets [ ] not balanced
REG_EBRACK brackets [ ] not balanced
REG_EPAREN parentheses ( ) not balanced
REG_EPAREN parentheses ( ) not balanced
...
@@ -477,7 +477,7 @@ REG_BADBR invalid repetition count(s) in { }
...
@@ -477,7 +477,7 @@ REG_BADBR invalid repetition count(s) in { }
REG_ERANGE invalid character range in [ ]
REG_ERANGE invalid character range in [ ]
REG_ESPACE ran out of memory
REG_ESPACE ran out of memory
REG_BADRPT ?, *, or + operand invalid
REG_BADRPT ?, *, or + operand invalid
REG_EMPTY empty
(
sub
)
expression
REG_EMPTY empty
expression or
subexpression
REG_ASSERT ``can't happen''\(emyou found a bug
REG_ASSERT ``can't happen''\(emyou found a bug
REG_INVARG invalid argument, e.g. negative-length string
REG_INVARG invalid argument, e.g. negative-length string
.fi
.fi
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/regexp.c
+
2
−
2
View file @
184fb14b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.3
4
2001/0
1/24 19:43:14 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.3
5
2001/0
3/19 22:27:46 tgl
Exp $
*
*
* Alistair Crooks added the code for the regex caching
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
* agc - cached the regular expressions used - there's a good chance
...
@@ -140,7 +140,7 @@ RE_compile_and_execute(text *text_re, char *text, int cflags)
...
@@ -140,7 +140,7 @@ RE_compile_and_execute(text *text_re, char *text, int cflags)
/* re didn't compile */
/* re didn't compile */
pg95_regerror
(
regcomp_result
,
&
rev
[
oldest
].
cre_re
,
errMsg
,
pg95_regerror
(
regcomp_result
,
&
rev
[
oldest
].
cre_re
,
errMsg
,
sizeof
(
errMsg
));
sizeof
(
errMsg
));
elog
(
ERROR
,
"
regcomp failed with error
%s"
,
errMsg
);
elog
(
ERROR
,
"
Invalid regular expression:
%s"
,
errMsg
);
}
}
/* not reached */
/* not reached */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment