Re: Hi, I have a question regarding the postgresql scripting

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mehrab Erfani <me(at)vuit(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Hi, I have a question regarding the postgresql scripting
Date: 2003-08-29 02:44:31
Message-ID: 20030829024431.GC4373@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Aug 28, 2003 at 14:40:37 -0800,
Mehrab Erfani <me(at)vuit(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yudha Setiawan 2003-08-29 06:35:04 Can not deleted all record
Previous Message Mehrab Erfani 2003-08-28 22:40:37 Hi, I have a question regarding the postgresql scripting