"Sokolov Yura" <funny(dot)falcon(at)gmail(dot)com> writes:
> xpath() crashes backend when is querying particular xmlagg results.
Please see whether this patch fixes it:
http://archives.postgresql.org/pgsql-committers/2008-01/msg00190.php
The specific examples you give seem to be fixed, but that's not very
much of a test case for such a low-level issue.
regards, tom lane