pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Mehrab Erfani <me@vuit.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Hi, I have a question regarding the postgresql scripting
Date: Thu, 28 Aug 2003 21:44:31 -0500
Message-ID: <20030829024431.GC4373@wolff.to> (raw)
In-Reply-To: <000a01c36db5$676227e0$0e01000a@MEHRAB>
References: <000a01c36db5$676227e0$0e01000a@MEHRAB>

On Thu, Aug 28, 2003 at 14:40:37 -0800,
  Mehrab Erfani <me@vuit.com> wrote:
>  
> I have written a script to import some data into my
> database tables, with the delimiter ','. Now my question
> is sometime the data being sent to my tables might not
> match the data type or be corrupted and I receive an error message.
> One: how could I prevent that?
> Two: how can I divert all my error messages to a log file, where I can see
> the errors later?
> Three: how can I proceed with importing the rest of the data even though
> some are corrupted?
> Thanks

Your script needs to check the data before passing it off to COPY or INSERT.



view thread (2+ messages)

Message-ID: <20030829024431.GC4373@wolff.to>
Permalink:  ../20030829024431.GC4373@wolff.to/
Also on:    postgresql.org/message-id/20030829024431.GC4373@wolff.to

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, me@vuit.com
  Subject: Re: Hi, I have a question regarding the postgresql scripting
  In-Reply-To: <20030829024431.GC4373@wolff.to>
  References: <000a01c36db5$676227e0$0e01000a@MEHRAB> <20030829024431.GC4373@wolff.to>

* 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