mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Include example of table loading using the COPY command.
This commit is contained in:
parent
c452ddcac6
commit
e47e0e6923
@ -104,7 +104,16 @@ INSERT INTO weather
|
|||||||
<Para>
|
<Para>
|
||||||
You can also use the <Command>copy</Command> command to perform load large
|
You can also use the <Command>copy</Command> command to perform load large
|
||||||
amounts of data from flat (<Acronym>ASCII</Acronym>) files.
|
amounts of data from flat (<Acronym>ASCII</Acronym>) files.
|
||||||
</Para>
|
This is usually faster because the data is read (or written) as a single atomic
|
||||||
|
transaction directly to or from the target table. An example would be:
|
||||||
|
|
||||||
|
<ProgramListing>
|
||||||
|
COPY INTO weather FROM '/home/user/weather.txt'
|
||||||
|
USING DELIMITERS '|';
|
||||||
|
</ProgramListing>
|
||||||
|
|
||||||
|
where the path name for the source file must be available to the backend server
|
||||||
|
machine, not just the client.
|
||||||
|
|
||||||
<Sect1>
|
<Sect1>
|
||||||
<Title>Querying a Class</Title>
|
<Title>Querying a Class</Title>
|
||||||
|
Loading…
Reference in New Issue
Block a user