Thread: pgsql: Avoid unnecessary copying of source string when generating a

pgsql: Avoid unnecessary copying of source string when generating a

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Avoid unnecessary copying of source string when generating a cloned TParser.
For long source strings the copying results in O(N^2) behavior, and the
multiplier can be significant if wide-char conversion is involved.

Andres Freund, reviewed by Kevin Grittner.

Modified Files:
--------------
    pgsql/src/backend/tsearch:
        wparser_def.c (r1.25 -> r1.26)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/wparser_def.c?r1=1.25&r2=1.26)