Rewrite ReadArrayStr() to avoid O(N^2) behavior on large strings,
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Sep 2004 01:39:02 +0000 (01:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Sep 2004 01:39:02 +0000 (01:39 +0000)
commitae8f7313abaaed98248dcafbef14559a4b6c5efc
tree6fc0fcd76cdd6e820a0d262cc983f6e1a616a404
parent5a2c8cf4b1fdac61fc4b3748ee292ee24c80af3a
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.
src/backend/utils/adt/arrayfuncs.c