Am Mittwoch, 4. April 2007 14:42 schrieb Nikolay Samokhvalov: > Maybe it's worth to start keeping additional information in xml datum (i.e. > bit IS_DOCUMENT and, what is more important for xpath() function, a bit > indicating that XML value has only one root and can be considered as a tree > => there is no need to wrap with <x> .. </x>). But this change requires > additional time to design xml datum structure and to rework the code > (macros, I/O functions...).
To determine if an XML datum is a document, call xml_is_document(). The implementation of that function is probably not the best possible one, but what the xpath() code does it totally wrong nevertheless. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq