Re: [GENERAL] Import data from a file - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: [GENERAL] Import data from a file
Date
Msg-id Pine.GSO.4.02A.9910251511520.7688-100000@Hjort.DoCS.UU.SE
Whole thread Raw
In response to Import data from a file  (datab@main.kenken.ro)
List pgsql-general
On Mon, 25 Oct 1999 datab@main.kenken.ro wrote:

> How can I import data from a file into existing table?

Contrary to what some other people have said (and will say) you perhaps
cannot use the copy command, since it can only read in files on the same
file system as the database server. There is the psql \copy command which
is a wrapper around the backend's copy but will act on the client's file
system.

In general your existing file has to be very carefully crafted to work
right with either copy incarnation. If it isn't I'd personally go for a
Perl script, but any other higher level language would do.

    -Peter

--
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: Johann Höchtl
Date:
Subject: time difference
Next
From: soundar rajan
Date:
Subject: retrieving last 3 rows