Re: copy - Mailing list pgsql-admin

From Geoffrey
Subject Re: copy
Date
Msg-id 41ADC09F.4020002@3times25.net
Whole thread Raw
In response to copy  ("H.J. Sanders" <hjs@rmax.nl>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: "Vishal Kashyap @ [SaiHertz]"
Date:
Subject: Re: Export/Import
Next
From: "Vishal Kashyap @ [SaiHertz]"
Date:
Subject: Re: Linux PostgreSQL to Windows PostgreSQL