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