diff options
Diffstat (limited to 'contrib/tsearch2/tsvector.c')
-rw-r--r-- | contrib/tsearch2/tsvector.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c index 059a247f186..ac8923d8dac 100644 --- a/contrib/tsearch2/tsvector.c +++ b/contrib/tsearch2/tsvector.c @@ -550,6 +550,14 @@ tsvector_out(PG_FUNCTION_ARGS) curout = outbuf + pos; *curout++ = '\''; } + else if (t_iseq(curin, '\\')) + { + int4 pos = curout - outbuf; + + outbuf = (char *) repalloc((void *) outbuf, ++lenbuf); + curout = outbuf + pos; + *curout++ = '\\'; + } while (len--) *curout++ = *curin++; } |