cursor_to_xml: How to signal end?

Started by Peter Eisentrautover 15 years ago1 messages
#1Peter Eisentraut
peter_e@gmx.net

Currently, cursor_to_xml returns an empty string when the end of the
cursor is reached (meaning the fetch returned zero rows). As discussed
on -general, that's kind of weird, because you'd have to do something
like

IF val::text = ''

to test for the end, since there is no = operator for xml, and also
because '' isn't a valid XML value at all.

What would be a good way to address this? Return null perhaps?