Re: query_to_xml() returns invalid XML when query returns no rows

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: query_to_xml() returns invalid XML when query returns no rows
Date: 2018-03-13 22:28:35
Message-ID: 4a4ad503-c879-0afb-d307-c81107421422@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2018-03-13 22:37:45 Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas
Previous Message Tom Lane 2018-03-13 20:52:16 Re: Is there a way to create a functional index that tables tableoid column as an arg?