copy command with PSQL

From: shaunnx(at)my-deja(dot)com (X)
To: pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: copy command with PSQL
Date: 2001-11-05 18:13:15
Message-ID: 6375fd1b.0111051013.f75fed6@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Sorry if this is a repost --

Howdy:

Regarding the 'copy' command, are there any examples
as to it's usage? Let me give you some background on
what I'm doing.

From my DB2/Mainframe to NT/DB2Connect environment, I have
an SQL script that pulls data down. I can append the
data into a flat ASCII file format, but because some of the data
in some columns are broken up, it doesn't seem possible to
import the data into Postgres. (e.g., the address col. may
have "66 w. baker street" ... but the format of the file is
space delimited, so each group of words are looked at as a
column).

DB2 will, however, let me create a file that is a binary
format. (e.g., EXPORT to F:\backup\test.ixf of IXF)
After looking at some of the Postgres documentation,
there is a copy command that says, 'copies data between files
and tables'.

Now, I'm trying to figure out how can I copy this binary file
and load it into a table on Postgres? Is it possible?

Thanks!

-X

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Keary Suska 2001-11-05 20:03:54 Re: Use of Serial Datatype and Sequence Issue
Previous Message Tom Lane 2001-11-05 18:08:19 Re: request for advise

Browse pgsql-sql by date

  From Date Subject
Next Message David Stanaway 2001-11-05 23:07:50 Re: select from a dynamic table name
Previous Message Ligia Pimentel 2001-11-05 17:39:02 Left join error