Subject: "IS NOT DOCUMENT" is missing

From: PG Doc comments form <[email-masked]>
Date: Fri, 09 Mar 2018 03:10:50 +0000

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/functions-xml.html
Description:

From testing, it seems like PostgreSQL supports the syntax "IS NOT DOCUMENT"
in addition to "IS DOCUMENT", similar to "IS NOT NULL", "IS NOT FALSE", etc,
however this does not appear to be documented, only "IS DOCUMENT" is.

---

From: Euler Taveira <[email-masked]>
Date: Fri, 16 Mar 2018 01:56:32 -0300

> however this does not appear to be documented, only "IS DOCUMENT" is.
It has been like that since day 1. I'm not sure why it was not
documented. It already has some tests. I'll bet that was an oversight.
Should we repeat the statement in another item (like the attached
patch)? Another option is to add a statement in the "IS DOCUMENT"
item. I'm afraid that NULL return wouldn't be clear.

-- 
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2f59af2..fcef246 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10399,6 +10399,24 @@ SELECT xmlagg(x) FROM (SELECT * FROM test ORDER BY y DESC) AS tab;
     </para>
    </sect3>
 
+   <sect3>
+    <title><literal>IS NOT DOCUMENT</literal></title>
+
+    <indexterm>
+     <primary>IS NOT DOCUMENT</primary>
+    </indexterm>
+
+<synopsis>
+<replaceable>xml</replaceable> IS NOT DOCUMENT
+</synopsis>
+
+    <para>
+     The expression <literal>IS NOT DOCUMENT</literal> returns false if the
+     argument XML value is a proper XML document, true if it is not (that is,
+     it is a content fragment), or null if the argument is null.
+    </para>
+   </sect3>
+
    <sect3 id="xml-exists">
     <title><literal>XMLEXISTS</literal></title>

---

From: Bruce Momjian <[email-masked]>
Date: Fri, 30 Mar 2018 10:40:07 -0400

> item. I'm afraid that NULL return wouldn't be clear.

Patch applied and backpatched to Postgres 10.  Thank.s

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 2 Apr 2018 11:51:50 -0400

> Patch applied and backpatched to Postgres 10.  Thank.s

Per the nearby discussion, this should probably also be backpatched further.

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

---

From: Bruce Momjian <[email-masked]>
Date: Mon, 2 Apr 2018 16:41:59 -0400

> Per the nearby discussion, this should probably also be backpatched further.

OK, backpatched through 9.3.