cursor_to_xml: How to signal end? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject cursor_to_xml: How to signal end?
Date
Msg-id 1274904959.19408.17.camel@vanquo.pezone.net
Whole thread Raw
List pgsql-hackers
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?



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Exposing the Xact commit order to the user
Next
From: Robert Haas
Date:
Subject: Re: Exposing the Xact commit order to the user