Skip site navigation (1) Skip section navigation (2)

Re: copy

From: "CHRIS HOOVER" <CHRIS(dot)HOOVER(at)companiongroup(dot)com>
To: H J Sanders <hjs(at)rmax(dot)nl>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: copy
Date: 2004-12-01 15:03:00
Message-ID: NY1154e2-5bab29d5@companiongroup.com (view raw or flat)
Thread:
Lists: pgsql-admin
cat <file> | sed '<delimiter>$//' > <file>.new

this should remove the last delimiter
------------------( Forwarded letter 1 follows )---------------------
Date: Wed, 1 Dec 2004 13:33:26 +0100
To: pgsql-admin(at)postgresql(dot)org(dot)comp
From: H(dot)J(dot)Sanders[hjs](at)rmax(dot)nl(dot)comp
Sender: pgsql-admin-owner+m15591(at)postgresql(dot)org(dot)comp
Subject: [ADMIN] copy


Hello.

We are moving a database from informix to Postgresql.

To do so we do an unload from Informix and copy to postgresql.

Informix unloads with a delimiter also after the last field in a record.

This is no problem when doing a copy to Postgresql 7.2
You get a warning (to many fields) but the copy process continues.

In 7.4 however the copy stops .

Does anyone know how to proceed the copy or a fast way to remove the last
character
from the unload files.

They are anyhow to big to handle with vi.

Many thanks

Henk Sanders


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

pgsql-admin by date

Next:From: CHRIS HOOVERDate: 2004-12-01 15:13:00
Subject: Re: copy
Previous:From: Pradeepkumar, Pyatalo (IE10)Date: 2004-12-01 13:25:47
Subject: PSQL History not working

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group