Skip site navigation (1) Skip section navigation (2)

Re: Use of backslash in tsearch2

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: teodor(at)sigaev(dot)ru, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Use of backslash in tsearch2
Date: 2006-08-22 00:48:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Bruce Momjian wrote:
> Bruce Momjian wrote:
> > 
> > I backed out the patch, attached, and it has fixed the regression
> > problem.  What has me confused is that is looks like it is checking for
> > ', then putting \, which doesn't make a lot of sense, but the regression
> > output is corrected, so I just don't get it.  Here is an example:
> > 
> > 	test=> SELECT E'''1 \\''2''';
> > 	 ?column?
> > 	----------
> > 	 '1 \'2'
> > 
> > My only guess is that the output is somehow a single-quoted string
> > itself, and in fact \' should become ''.  Is that right?  Basically they
> > are doing \' in their output, and it should be doing '', but then the
> > query above would be wrong and shouldn't be using \'.
> As part of the move to support standard-conforming strings and treat
> backslash literally, I reviewed the tsearch2 code and found two place
> that seemed to use \' rather than '', and generated the attached patch. 
> ('' is standards conforming.)  However, when I fixed the code, the
> regression tests failed.
> Teodor, are the new attached regression results correct?  If so, I will
> apply the patch and update the expected file.

Updated patch attached.  The previous one was reversed.

  Bruce Momjian   bruce(at)momjian(dot)us

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /pgpatches/tsearch2
Description: text/x-diff (1.3 KB)

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-08-22 00:52:04
Subject: Open 8.2 items
Previous:From: mdeanDate: 2006-08-22 00:45:10
Subject: Re: ISBN/ISSN/ISMN/EAN13 module

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-08-22 00:52:47
Subject: Re: Contrib module to examine client certificate
Previous:From: Bruce MomjianDate: 2006-08-22 00:28:27
Subject: Re: Use of backslash in tsearch2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group