Bill Thoen asked:

> 
> I've got to load some large fixed-legnth ASCII records into PG and I was 
> wondering how this is done. The Copy command looks like it works only 
> with delimited files, and I would hate to have to convert these files to 
> INSERT-type SQL to run them through psql.. Is there a way one can 
> specify a table structure with raw field widths and then just pass it a 
> flat file?

One possibility might be to create a table with one column of type text, load 
the data into that table with copy, and then, after creating the real table 
structure, populate it with the data by using substr and casts to get it into 
shape.

HTH,

Greg Williamson
Senior DBA
DigitalGlobe

Confidentiality Notice: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information and must be protected in accordance with those 
provisions. Any unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please contact the sender by 
reply e-mail and destroy all copies of the original message.

(My corporate masters made me say this.)

Reply via email to