Thomas Kellerer wrote:
> Hi,
> 
> I would like to suggest to enhance the documentation of the CREATE VIEW
> statement.
> 
> I think the fact that a "SELECT *" is internally stored as the expanded
> column list (valid at the time when the view was created) should be
> documented together with the CREATE VIEW statement. Especially because
> the example does use SELECT * to create the view.

Agreed.  The attached, applied patch documents this behavior.

--
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/ref/create_view.sgml b/doc/src/sgml/ref/create_view.sgml
index dd15507..417f8c3 100644
*** a/doc/src/sgml/ref/create_view.sgml
--- b/doc/src/sgml/ref/create_view.sgml
*************** CREATE VIEW comedies AS
*** 173,178 ****
--- 173,182 ----
      FROM films
      WHERE kind = 'Comedy';
  </programlisting>
+    This will create a view containing the columns that are in the
+    <literal>film</> table at the time of view creation.  Though
+    <literal>*</> was used to create the view, columns added later to
+    the table will not be part of the view.
    </para>
   </refsect1>
  
-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to