|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.51 2004/01/19 19:04:40 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.52 2004/02/03 17:52:55 tgl Exp $ |
12 | 12 | * |
13 | 13 | *Alistair Crooks added the code for the regex caching |
14 | 14 | *agc - cached the regular expressions used - there's a good chance |
@@ -119,7 +119,8 @@ RE_compile_and_execute(text *text_re, unsigned char *dat, int dat_len, |
119 | 119 | */ |
120 | 120 | for (i=0;i<num_res;i++) |
121 | 121 | { |
122 | | -if (memcmp(re_array[i].cre_pat,text_re,text_re_len)==0&& |
| 122 | +if (VARSIZE(re_array[i].cre_pat)==text_re_len&& |
| 123 | +memcmp(re_array[i].cre_pat,text_re,text_re_len)==0&& |
123 | 124 | re_array[i].cre_flags==cflags) |
124 | 125 | { |
125 | 126 | /* |
|