cursor_to_xml: How to signal end?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: cursor_to_xml: How to signal end?
Date: 2010-05-26 20:15:59
Message-ID: 1274904959.19408.17.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-05-26 20:19:42 Re: Exposing the Xact commit order to the user
Previous Message Dimitri Fontaine 2010-05-26 20:11:50 Re: Exposing the Xact commit order to the user