Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6HNJoa36231 for ; Tue, 17 Jul 2001 19:19:50 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f6HNJjX28802; Tue, 17 Jul 2001 19:19:45 -0400 (EDT) To: Chris Ruprecht cc: "pgsql-sql@postgresql.org" Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :) In-reply-to: References: Comments: In-reply-to Chris Ruprecht message dated "Tue, 17 Jul 2001 17:45:33 -0500" Date: Tue, 17 Jul 2001 19:19:44 -0400 Message-ID: <28799.995411984@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200107/237 X-Sequence-Number: 4033 Chris Ruprecht 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