mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Code review for CREATE OR REPLACE VIEW patch. Do things in a saner order to
result in hopefully-less-confusing error messages when the new definition isn't compatible with the old; minor other cleanup.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_view.sgml,v 1.38 2008/12/06 23:22:46 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_view.sgml,v 1.39 2008/12/15 21:35:31 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -38,9 +38,10 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
|
||||
<para>
|
||||
<command>CREATE OR REPLACE VIEW</command> is similar, but if a view
|
||||
of the same name already exists, it is replaced. The new query must
|
||||
generate all of the same columns that were generated by the original query
|
||||
in the same order and with the same data types, but may add additional
|
||||
columns to the end of the list.
|
||||
generate the same columns that were generated by the existing view query
|
||||
(that is, the same column names in the same order and with the same data
|
||||
types), but it may add additional columns to the end of the list. The
|
||||
calculations giving rise to the output columns may be completely different.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -77,7 +78,7 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="parameter">name</replaceable></term>
|
||||
<listitem>
|
||||
@ -164,7 +165,7 @@ CREATE VIEW comedies AS
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title>Compatibility</title>
|
||||
|
||||
|
Reference in New Issue
Block a user