|
1 | 1 | <!-- |
2 | | -$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.30 2002/04/23 02:07:15 tgl Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.31 2002/05/14 18:47:58 tgl Exp $ |
3 | 3 | PostgreSQL documentation |
4 | 4 | --> |
5 | 5 |
|
@@ -175,8 +175,10 @@ ERROR: <replaceable>reason</replaceable> |
175 | 175 | <productname>PostgreSQL</productname> tables and |
176 | 176 | standard file-system files. |
177 | 177 |
|
178 | | - <command>COPY TO</command> copies the entire contents of a table to |
179 | | - a file, while <command>COPY FROM</command> copies data from a file to a |
| 178 | + <command>COPY TO</command> copies the entire contents of a table |
| 179 | + <emphasis>to</> |
| 180 | + a file, while <command>COPY FROM</command> copies data <emphasis>from</> a |
| 181 | + file to a |
180 | 182 | table (appending the data to whatever is in the table already). |
181 | 183 | </para> |
182 | 184 |
|
@@ -230,26 +232,26 @@ ERROR: <replaceable>reason</replaceable> |
230 | 232 | </para> |
231 | 233 |
|
232 | 234 | <para> |
233 | | - You must have <firstterm>selectaccess</firstterm> on any table |
| 235 | + You must have <firstterm>selectprivilege</firstterm> on any table |
234 | 236 | whose values are read by |
235 | | - <command>COPY</command>, and either |
236 | | - <firstterm>insert</firstterm> or <firstterm>update access</firstterm>to a |
237 | | - table into which values are being inserted by <command>COPY</command>. |
| 237 | + <command>COPY TO</command>, and |
| 238 | + <firstterm>insert privilege</firstterm>on a |
| 239 | + table into which values are being inserted by <command>COPY FROM</command>. |
238 | 240 | The backend also needs appropriate Unix permissions for any file read |
239 | 241 | or written by <command>COPY</command>. |
240 | 242 | </para> |
241 | 243 |
|
242 | 244 | <para> |
243 | | - <command>COPYTO</command> neither invokes rules nor acts on column |
| 245 | + <command>COPYFROM</command> neither invokes rules nor acts on column |
244 | 246 | defaults. It does invoke triggers and check constraints. |
245 | 247 | </para> |
246 | 248 |
|
247 | 249 | <para> |
248 | 250 | <command>COPY</command> stops operation at the first error. This |
249 | 251 | should not lead to problems in the event of |
250 | | - a <command>COPYFROM</command>, but the |
| 252 | + a <command>COPYTO</command>, but the |
251 | 253 | target relation will already have received earlier rows in a |
252 | | - <command>COPYTO</command>. These rows will not be visible or |
| 254 | + <command>COPYFROM</command>. These rows will not be visible or |
253 | 255 | accessible, but they still occupy disk space. This may amount to a |
254 | 256 | considerable amount |
255 | 257 | of wasted disk space if the failure happened well into a large copy |
|