1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +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/tsvector.c,v 1.8 2007/11/15 22:25:16 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.9 2007/11/16 15:05:59 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@ -345,6 +345,8 @@ tsvectorout(PG_FUNCTION_ARGS)
if (t_iseq(curin, '\''))
*curout++ = '\'';
else if (t_iseq(curin, '\\'))
*curout++ = '\\';
while (len--)
*curout++ = *curin++;