diff options
| author | Teodor Sigaev <teodor@sigaev.ru> | 2007-11-16 17:03:15 +0000 |
|---|---|---|
| committer | Teodor Sigaev <teodor@sigaev.ru> | 2007-11-16 17:03:15 +0000 |
| commit | 7b855679623eb4096390b827aaa24ba3b1d2bd27 (patch) | |
| tree | 5378edd29b6171be8b0a114de2565c3c208ec690 /contrib/tsearch2/query.c | |
| parent | bf519d64f404776c163f3f9446ddd05bc10b2fbf (diff) | |
Backpatch: Fix tsvector_out() and tsquery_out() to escape backslesh, add test of that.
Patch by Bruce Momjian <bruce@momjian.us>
Diffstat (limited to 'contrib/tsearch2/query.c')
| -rw-r--r-- | contrib/tsearch2/query.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index 37f60caf1ad..c86169874cb 100644 --- a/contrib/tsearch2/query.c +++ b/contrib/tsearch2/query.c @@ -765,6 +765,11 @@ infix(INFIX * in, bool first) *(in->cur) = '\''; in->cur++; } + else if (t_iseq(op, '\\')) + { + *(in->cur) = '\\'; + in->cur++; + } COPYCHAR(in->cur, op); clen = pg_mblen(op); |
