pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Ruprecht <chrup999@yahoo.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
Date: Tue, 17 Jul 2001 19:19:44 -0400
Message-ID: <28799.995411984@sss.pgh.pa.us> (raw)
In-Reply-To: <B77A2A2C.2466%chrup999@yahoo.com>
References: <B77A2A2C.2466%chrup999@yahoo.com>

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



view thread (10+ messages)  latest in thread

Message-ID: <28799.995411984@sss.pgh.pa.us>
Permalink:  ../28799.995411984@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28799.995411984@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chrup999@yahoo.com
  Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
  In-Reply-To: <28799.995411984@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox