This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new fb265f2dca5 Fix conflict for regex
fb265f2dca5 is described below
commit fb265f2dca536630e1e6d6fcc945ae6cdf02c436
Author: Jinbao Chen <[email protected]>
AuthorDate: Fri Jul 18 15:58:26 2025 +0800
Fix conflict for regex
---
src/backend/regex/regcomp.c | 49 ---------------------------------------------
src/backend/regex/regexec.c | 5 -----
2 files changed, 54 deletions(-)
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c
index 031c42e939d..15b264e50f1 100644
--- a/src/backend/regex/regcomp.c
+++ b/src/backend/regex/regcomp.c
@@ -38,45 +38,6 @@
* forward declarations, up here so forward datatypes etc. are defined early
*/
/* === regcomp.c === */
-<<<<<<< HEAD
-static void moresubs(struct vars *, int);
-static int freev(struct vars *, int);
-static void makesearch(struct vars *, struct nfa *);
-static struct subre *parse(struct vars *, int, int, struct state *, struct
state *);
-static struct subre *parsebranch(struct vars *, int, int, struct state *,
struct state *, int);
-static struct subre *parseqatom(struct vars *, int, int, struct state *,
struct state *, struct subre *);
-static void nonword(struct vars *, int, struct state *, struct state *);
-static void word(struct vars *, int, struct state *, struct state *);
-static void charclass(struct vars *, enum char_classes,
- struct state *, struct state *);
-static void charclasscomplement(struct vars *, enum char_classes,
- struct state *,
struct state *);
-static int scannum(struct vars *);
-static void repeat(struct vars *, struct state *, struct state *, int, int);
-static void bracket(struct vars *, struct state *, struct state *);
-static void cbracket(struct vars *, struct state *, struct state *);
-static void brackpart(struct vars *, struct state *, struct state *, bool *);
-static const chr *scanplain(struct vars *);
-static void onechr(struct vars *, chr, struct state *, struct state *);
-static void optimizebracket(struct vars *, struct state *, struct state *);
-static void wordchrs(struct vars *);
-static void processlacon(struct vars *, struct state *, struct state *, int,
- struct state *, struct state
*);
-static struct subre *subre(struct vars *, int, int, struct state *, struct
state *);
-static void freesubre(struct vars *, struct subre *);
-static void freesubreandsiblings(struct vars *, struct subre *);
-static void freesrnode(struct vars *, struct subre *);
-static void optst(struct vars *, struct subre *);
-static int numst(struct subre *, int);
-static void markst(struct subre *);
-static void cleanst(struct vars *);
-static long nfatree(struct vars *, struct subre *, FILE *);
-static long nfanode(struct vars *, struct subre *, int, FILE *);
-static int newlacon(struct vars *, struct state *, struct state *, int);
-static void freelacons(struct subre *, int);
-static void rfree(regex_t *);
-static int rcancelrequested(void);
-=======
static void moresubs(struct vars *v, int wanted);
static int freev(struct vars *v, int err);
static void makesearch(struct vars *v, struct nfa *nfa);
@@ -125,7 +86,6 @@ static int newlacon(struct vars *v, struct state *begin,
struct state *end,
int latype);
static void freelacons(struct subre *subs, int n);
static void rfree(regex_t *re);
->>>>>>> REL_16_9
static int rstacktoodeep(void);
#ifdef REG_DEBUG
@@ -1105,15 +1065,6 @@ parseqatom(struct vars *v,
break;
case BACKREF: /* the Feature From The Black
Lagoon */
INSIST(type != LACON, REG_ESUBREG);
-<<<<<<< HEAD
- INSIST(v->nextvalue < v->nsubs, REG_ESUBREG);
- INSIST(v->subs[v->nextvalue] != NULL, REG_ESUBREG);
- NOERRN();
- assert(v->nextvalue > 0);
- atom = subre(v, 'b', BACKR, lp, rp);
- NOERRN();
-=======
->>>>>>> REL_16_9
subno = v->nextvalue;
assert(subno > 0);
INSIST(subno < v->nsubs, REG_ESUBREG);
diff --git a/src/backend/regex/regexec.c b/src/backend/regex/regexec.c
index bab70cf0989..2a1d5bebda3 100644
--- a/src/backend/regex/regexec.c
+++ b/src/backend/regex/regexec.c
@@ -240,10 +240,6 @@ pg_regexec(regex_t *re,
{
/* we can store results directly in caller's array */
v->pmatch = pmatch;
-<<<<<<< HEAD
- if (v->nmatch > 0)
- zapallsubs(v->pmatch, v->nmatch);
-=======
/* ensure any extra entries in caller's array are filled with
-1 */
if (nmatch > 0)
zapallsubs(pmatch, nmatch);
@@ -252,7 +248,6 @@ pg_regexec(regex_t *re,
nmatch = v->g->nsub + 1;
v->nmatch = nmatch;
}
->>>>>>> REL_16_9
v->details = details;
v->start = (chr *) string;
v->search_start = (chr *) string + search_start;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]