Re: xpath_array with namespaces support

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: xpath_array with namespaces support
Дата
Msg-id e431ff4c0704040715k3f68be79of843330b441c2152@mail.gmail.com
обсуждение исходный текст
Ответ на Re: xpath_array with namespaces support  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-patches
On 4/4/07, Nikolay Samokhvalov <nikolay@samokhvalov.com> wrote:

So, choosing between two inefficient approaches:
 1. mine, which in some cases use dummy element wrapping, that we could escape;
 2. proposed by you, which leads to +1 parsing.
... I'd definitely choose the first one.

I'd make it a bit more clear.

We have different cases for XML value as input of xpath():
 a. document with prolog ('<?xml...')
 b. document w/o prolog (value that can be represented as a tree -- i.e. we have one root)
 c. fragment with one root element (can be represented as a tree)
 d. fragment w/o root element (cannot be represented as a tree, e.g. 'bla'::xml)

So, the current implementation works w/o wrapping in case a) and use wrapping for cases b)-d).
But we _need_ wrapping _only_ in case d) -- so there is space for optimization (I would keep bit "this value is not a tree" in the value itself).

--
Best regards,
Nikolay

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: xpath_array with namespaces support
Следующее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch