mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
Install Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up from
8.4.1). This corrects some curious regex bugs, though not the greediness issue I was hoping to find a solution for :-(
This commit is contained in:
parent
38929bc06a
commit
f5778c63e5
@ -28,7 +28,7 @@
|
|||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.39 2003/09/29 00:21:58 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.39.2.1 2004/11/24 22:57:09 tgl Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -589,8 +589,13 @@ makesearch(struct vars * v,
|
|||||||
break;
|
break;
|
||||||
if (b != NULL)
|
if (b != NULL)
|
||||||
{ /* must be split */
|
{ /* must be split */
|
||||||
s->tmp = slist;
|
if (s->tmp == NULL)
|
||||||
slist = s;
|
{ /* if not already in the list */
|
||||||
|
/* (fixes bugs 505048, 230589, */
|
||||||
|
/* 840258, 504785) */
|
||||||
|
s->tmp = slist;
|
||||||
|
slist = s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2226,12 +2231,12 @@ stid(struct subre * t,
|
|||||||
size_t bufsize)
|
size_t bufsize)
|
||||||
{
|
{
|
||||||
/* big enough for hex int or decimal t->retry? */
|
/* big enough for hex int or decimal t->retry? */
|
||||||
if (bufsize < sizeof(int) * 2 + 3 || bufsize < sizeof(t->retry) * 3 + 1)
|
if (bufsize < sizeof(void *) * 2 + 3 || bufsize < sizeof(t->retry) * 3 + 1)
|
||||||
return "unable";
|
return "unable";
|
||||||
if (t->retry != 0)
|
if (t->retry != 0)
|
||||||
sprintf(buf, "%d", t->retry);
|
sprintf(buf, "%d", t->retry);
|
||||||
else
|
else
|
||||||
sprintf(buf, "0x%x", (int) t); /* may lose bits, that's okay */
|
sprintf(buf, "%p", t);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif /* REG_DEBUG */
|
#endif /* REG_DEBUG */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user