1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Fix tsvectorout() and tsqueryout() to escape backslesh, add test of that.

Patch by Bruce Momjian <bruce@momjian.us>

Backpatch is needed, but it's impossible to apply it directly
This commit is contained in:
Teodor Sigaev
2007-11-16 15:05:59 +00:00
parent 2f1e7ffb76
commit a867b40cf4
4 changed files with 30 additions and 2 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery.c,v 1.10 2007/11/15 22:25:16 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery.c,v 1.11 2007/11/16 15:05:59 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@ -614,6 +614,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);