pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@postgresql.org
Subject: Re: query_to_xml() returns invalid XML when query returns no rows
Date: Tue, 13 Mar 2018 18:28:35 -0400
Message-ID: <4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com> (raw)
In-Reply-To: <p8988c$ddt$1@blaine.gmane.org>
References: <p85r3j$qtb$1@blaine.gmane.org>
	<fb97da86-2397-4ccb-38a4-38153de31df0@2ndquadrant.com>
	<p8988c$ddt$1@blaine.gmane.org>

On 3/13/18 15:21, Thomas Kellerer wrote:
> I still think it's incorrect to return an empty (=invalid) XML instead of a NULL value though.

This behavior is specified in the SQL standard.  While an empty string
is not a valid XML "document", it is valid as XML "content".

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (4+ messages)

Message-ID: <4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com>
Permalink:  ../4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com/
Also on:    postgresql.org/message-id/4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, spam_eater@gmx.net
  Subject: Re: query_to_xml() returns invalid XML when query returns no rows
  In-Reply-To: <4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com>
  References: <p85r3j$qtb$1@blaine.gmane.org> <fb97da86-2397-4ccb-38a4-38153de31df0@2ndquadrant.com> <p8988c$ddt$1@blaine.gmane.org> <4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox