mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne,
code review by Tom Lane. Remaining issues: functions that take or return tuple types are likely to break if one drops (or adds!) a column in the table defining the type. Need to think about what to do here. Along the way: some code review for recent COPY changes; mark system columns attnotnull = true where appropriate, per discussion a month ago.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.34 2002/07/30 16:55:05 momjian Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.35 2002/08/02 18:15:04 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -21,16 +21,14 @@ PostgreSQL documentation
|
||||
<date>1999-12-11</date>
|
||||
</refsynopsisdivinfo>
|
||||
<synopsis>
|
||||
COPY <replaceable class="parameter">table</replaceable>
|
||||
[ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
FROM { '<replaceable class="parameter">filename</replaceable>' | <filename>stdin</filename> }
|
||||
[ [ WITH ]
|
||||
[ BINARY ]
|
||||
[ OIDS ]
|
||||
[ DELIMITER [ AS ] '<replaceable class="parameter">delimiter</replaceable>' ]
|
||||
[ NULL [ AS ] '<replaceable class="parameter">null string</replaceable>' ] ]
|
||||
COPY <replaceable class="parameter">table</replaceable>
|
||||
[ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column</replaceable> [, ...] ) ]
|
||||
TO { '<replaceable class="parameter">filename</replaceable>' | <filename>stdout</filename> }
|
||||
[ [ WITH ]
|
||||
[ BINARY ]
|
||||
@@ -201,10 +199,10 @@ ERROR: <replaceable>reason</replaceable>
|
||||
|
||||
<para>
|
||||
If a list of columns is specified, <command>COPY</command> will
|
||||
only copy the data in the specified columns to or from the table.
|
||||
If there are any columns in the table that are not in the table,
|
||||
<command>COPY FROM</command> will insert the default value for
|
||||
that column.
|
||||
only copy the data in the specified columns to or from the file.
|
||||
If there are any columns in the table that are not in the file,
|
||||
<command>COPY FROM</command> will insert the default values for
|
||||
those columns.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -266,8 +264,8 @@ ERROR: <replaceable>reason</replaceable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>COPY FROM</command> will invoke any triggers or check
|
||||
constraints. However, it will not invoke rules.
|
||||
<command>COPY FROM</command> will invoke any triggers and check
|
||||
constraints on the destination table. However, it will not invoke rules.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -330,12 +328,9 @@ ERROR: <replaceable>reason</replaceable>
|
||||
The attribute values themselves are strings generated by the
|
||||
output function, or acceptable to the input function, of each
|
||||
attribute's data type. The specified null-value string is used in
|
||||
place of attributes that are NULL. When using <command>COPY
|
||||
FROM</command> without a column list, each row of the input file
|
||||
must contain data for each attribute in the table: no missing data
|
||||
is allowed. Similarly, <command>COPY FROM</command> will raise
|
||||
an error if it encounters any data in the input file that would
|
||||
not be inserted into the table: extra data is not allowed.
|
||||
place of attributes that are NULL.
|
||||
<command>COPY FROM</command> will raise an error if any line of the
|
||||
input file contains more or fewer columns than are expected.
|
||||
</para>
|
||||
<para>
|
||||
If OIDS is specified, the OID is read or written as the first column,
|
||||
|
||||
Reference in New Issue
Block a user