Link to home
Create AccountLog in
Avatar of FreightTrain
FreightTrainFlag for United States of America

asked on

Import Fixed Length File into PostgreSQL Database

I need to Import a Fixed Length File into PostgreSQL Database.  Preferrably I need to create a function or stored proc that can be ran periodically when receiving a new data file.  Eventually, I would like to be able to do this via an automated script.  Please help, I am new to PostgreSQL and come from a SQL Server DTS background...
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

If you can cope with the Large Object Type then see.
file:///usr/share/doc/postgresql-8.2.3/html/lo-examplesect.html
Avatar of FreightTrain

ASKER

Where is this file at?  I looked in my local postgresql folder for this html file, but could not locate it...
Client-Side functions lo_import lo_export may be just the feature you are looking for.
Once the file is in the database, is there a way to break it up into separate columns and then use it to poulate several columns within a table?

Do you have an example of how this works?
ASKER CERTIFIED SOLUTION
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account