From 6568939852ee38e98e9ccca2598e6c1afa927ce8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 10 Aug 2001 23:09:30 +0000 Subject: [PATCH] Mention that COPY cannot be used on a view (per recent suggestion). Other small improvements. --- doc/src/sgml/ref/copy.sgml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 3c4dd31a5a..d433fbb01c 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -1,5 +1,5 @@ @@ -65,7 +65,7 @@ COPY [ BINARY ] table [ WITH OIDS ] WITH OIDS - Specifies copying the internal unique object id (OID) for each row. + Specifies copying the internal object id (OID) for each row. @@ -181,12 +181,12 @@ ERROR: reason - COPY instructs + COPY with a filename instructs the Postgres backend - to directly read from or write to a file. If a file name is specified, - the file must be accessible to the backend and the name must be specified + to directly read from or write to a file. + The file must be accessible to the backend and the name must be specified from the viewpoint of the backend. - If stdin or stdout is + When stdin or stdout is specified, data flows through the client frontend to the backend. @@ -209,6 +209,11 @@ ERROR: reason Notes + + COPY can only be used with plain tables, not with + views. + + The BINARY keyword will force all data to be stored/read as binary format rather than as text. It is @@ -318,6 +323,8 @@ ERROR: reason The OID is emitted as the first column if WITH OIDS is specified. + (An error is raised if WITH OIDS is specified for a table that does not + have OIDs.) If COPY TO is sending its output to standard @@ -525,7 +532,7 @@ If OIDs are included in the dump, the OID field immediately follows the field-count word. It is a normal field except that it's not included in the field-count. In particular it has a typlen --- this will allow handling of 4-byte vs 8-byte OIDs without too much pain, and will allow -OIDs to be shown as NULL if we someday allow OIDs to be optional. +OIDs to be shown as NULL if that ever proves desirable. -- GitLab