Importing lines of variable length from ASCII - Mailing list pgsql-novice

From Louis Becker
Subject Importing lines of variable length from ASCII
Date
Msg-id 21A6A90E7CD2584DB72892049E1DE78F0167F0B0@MAIL01.99eight.com
Whole thread Raw
Responses Re: Importing lines of variable length from ASCII
List pgsql-novice

Hi

 

I have an ASCII file that I try to import via the COPY command. The ASCII file is pipe delimited. Some lines in the file have no value in the last field and because there is no value in the last field, it also omits the last delimiter. It therefore seems that some lines have 11 columns while some other lines have 10 columns although these 10 columns correspond with the first 10 columns of lines that contain 11 columns. The omission of the last delimiter apparently is an accordance with the CSV files standard.

 

Apart from editing the ASCII files, is there a way to import these files that contain lines of variable length?


Louis

DISCLAIMER

This message is intended solely for the individual(s) and entity(s) to which it is addressed.  It is confidential and may contain legally privileged information.  Any unauthorized review, use, copying, storage, disclosure or distribution of this e-mail and any attachments is strictly prohibited.  If you are not the named recipient or have otherwise received this communication in error, please destroy this message from your system and kindly notify the sender by e-mail.

pgsql-novice by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Migration from INFORMIX to POSTGRESQL
Next
From: "A. Kretschmer"
Date:
Subject: Re: Importing lines of variable length from ASCII