Обсуждение: pgsql-server: Rewrite ReadArrayStr() to avoid O(N^2) behavior on large

Поиск
Список
Период
Сортировка

pgsql-server: Rewrite ReadArrayStr() to avoid O(N^2) behavior on large

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Rewrite ReadArrayStr() to avoid O(N^2) behavior on large strings,
and hopefully improve code clarity while at it.  One intentional
semantics change: a backslashed space will not be treated as removable
trailing whitespace, as the prior coding would do.  ISTM that if it
wouldn't be considered removable leading whitespace, it shouldn't be
stripped at the end either.

Modified Files:
--------------
    pgsql-server/src/backend/utils/adt:
        arrayfuncs.c (r1.112 -> r1.113)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/arrayfuncs.c.diff?r1=1.112&r2=1.113)