pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Geoffrey <esoteric@3times25.net>
To: H.J. Sanders <hjs@rmax.nl>
Cc: pgsql-admin@postgresql.org
Subject: Re: copy
Date: Wed, 01 Dec 2004 08:01:19 -0500
Message-ID: <41ADC09F.4020002@3times25.net> (raw)
In-Reply-To: <KIEBKBGIGGNDKKJJNKCFGECPDMAA.hjs@rmax.nl>
References: <KIEBKBGIGGNDKKJJNKCFGECPDMAA.hjs@rmax.nl>

H.J. Sanders wrote:
> 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.

sed 's/.$//' file > newfile

Always test before using, it's off the top of my head..

-- 
Until later, Geoffrey



view thread (11+ messages)  latest in thread

Message-ID: <41ADC09F.4020002@3times25.net>
Permalink:  ../41ADC09F.4020002@3times25.net/
Also on:    postgresql.org/message-id/41ADC09F.4020002@3times25.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: esoteric@3times25.net, hjs@rmax.nl
  Subject: Re: copy
  In-Reply-To: <41ADC09F.4020002@3times25.net>
  References: <KIEBKBGIGGNDKKJJNKCFGECPDMAA.hjs@rmax.nl> <41ADC09F.4020002@3times25.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox