Re: Documentation enhancement - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Documentation enhancement
Date
Msg-id 201102012218.p11MI1m26388@momjian.us
Whole thread Raw
In response to Documentation enhancement  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
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  <bruce@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>


pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: Windows to Linux PostgreSQL Migration
Next
From: Thom Brown
Date:
Subject: Re: Issues with generate_series using integer boundaries