Until and unless Pg reverts the change in question, I think we're going to need to sniff the version of postgres, loop over the array of results, and when the value does not start with '<' (is a text node) do the version-appropriate thing.
We can do that transparently (as a Pg superuser, at least) with something like the following:
alter function xpath(text,xml) rename to pgxpath;
alter function xpath(text,xml,text[]) rename to pgxpath;
create function xpath(text,xml) returns xml[] as $$ ... $$;
create function xpath(text,xml,text[]) returns xml[] as $$ ... $$;
Does anyone see a better path, other than the ideal of Pg bringing back spec-ish behavior?
Until and unless Pg reverts the change in question, I think we're going to need to sniff the version of postgres, loop over the array of results, and when the value does not start with '<' (is a text node) do the version-appropriate thing.
We can do that transparently (as a Pg superuser, at least) with something like the following:
alter function xpath(text,xml) rename to pgxpath; xml,text[ ]) rename to pgxpath; xml,text[ ]) returns xml[] as $$ ... $$;
alter function xpath(text,
create function xpath(text,xml) returns xml[] as $$ ... $$;
create function xpath(text,
Does anyone see a better path, other than the ideal of Pg bringing back spec-ish behavior?