Re: xpath processing brain dead

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: xpath processing brain dead
Дата
Msg-id 24524.1235772175@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: xpath processing brain dead  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: xpath processing brain dead  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
>> I'll do some tests to see what the cost of extra xml parsing might be.

> The extra cost appears to be fairly negligible.

Uh, you didn't actually show a comparison of before and after?
What it looks like to me is that this approach is free or nearly so for
well-formed documents, but doubles the parsing cost for forests.
Which is likely to annoy anyone who's really depending on the
capability.

Also,

> !         if (*VARDATA(xpath_expr_text) == '/')

This is risking a core dump if the xpath expr is of zero length.  You
need something like
    if (xpath_len > 0 && *VARDATA(xpath_expr_text) == '/')

It would also be a good idea if the allocation of string and xpath_expr
had a comment about why it's allocating extra space (something like "see
hacks below for use of this extra space" would be sufficient).
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1530)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1530)