Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :) - Mailing list pgsql-sql

From Tom Lane
Subject Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
Date
Msg-id 28799.995411984@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)  (Chris Ruprecht <chrup999@yahoo.com>)
List pgsql-sql
Chris Ruprecht <chrup999@yahoo.com> writes:
> If life was easy, everything would just come in the format I'd like it. But
> since it isn't, I need to create records like this one:
> ...
> From an input file where the records looks like this one:

If it's just a data import issue, why do you want to do it in a plpgsql
function?  Do the format massaging on the client side.  I'd think about
making a simple little sed or perl script (or whatever text-masher you
like) producing data that COPY would take.
        regards, tom lane


pgsql-sql by date:

Previous
From: Chris Ruprecht
Date:
Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
Next
From: "Josh Berkus"
Date:
Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)