Hi.

The description of DEFAULT in the documentation currently says:

"The value is any variable-free expression (subqueries and
cross-references to other columns in the current table are not allowed)."

But the value cannot be an aggregate expression, a window function, or a
set-returning function either, so maybe we should list these items too?

Attached is a patch that fixes the text in two places where the above
description appears.

Thanks,
Amit
diff --git a/doc/src/sgml/ref/create_foreign_table.sgml 
b/doc/src/sgml/ref/create_foreign_table.sgml
index 37a45b26db..d6199927ab 100644
--- a/doc/src/sgml/ref/create_foreign_table.sgml
+++ b/doc/src/sgml/ref/create_foreign_table.sgml
@@ -232,8 +232,9 @@ CHECK ( <replaceable 
class="parameter">expression</replaceable> ) [ NO INHERIT ]
      <para>
       The <literal>DEFAULT</literal> clause assigns a default data value for
       the column whose column definition it appears within.  The value
-      is any variable-free expression (subqueries and cross-references
-      to other columns in the current table are not allowed).  The
+      is any variable-free expression (subqueries, cross-references
+      to other columns in the current table, aggregate expressions,
+      window functions, and set-returning functions are not allowed).  The
       data type of the default expression must match the data type of the
       column.
      </para>
diff --git a/doc/src/sgml/ref/create_table.sgml 
b/doc/src/sgml/ref/create_table.sgml
index a6f3da594a..460d02c062 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -721,8 +721,9 @@ WITH ( MODULUS <replaceable 
class="parameter">numeric_literal</replaceable>, REM
      <para>
       The <literal>DEFAULT</literal> clause assigns a default data value for
       the column whose column definition it appears within.  The value
-      is any variable-free expression (subqueries and cross-references
-      to other columns in the current table are not allowed).  The
+      is any variable-free expression (subqueries, cross-references
+      to other columns in the current table, aggregate expressions,
+      window functions, and set-returning functions are not allowed).  The
       data type of the default expression must match the data type of the
       column.
      </para>

Reply via email to