pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Hi, I have a question regarding the postgresql scripting
2+ messages / 2 participants
[nested] [flat]

* Hi, I have a question regarding the postgresql scripting
@ 2003-08-28 22:40  Mehrab Erfani <me@vuit.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mehrab Erfani @ 2003-08-28 22:40 UTC (permalink / raw)
  To: pgsql-admin

Hi,
I tried to get answers back from the newsgroup and the mail list of
postgres.org, but wasn't that luck yet.
I did subscribe though under the name NICO, and with the mail add:
nico_king2002@yahoo.com
I'd appreciate it if you could answer my question.
 
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
 
Nico,
P.S: I hope I am makeing sense.

 

 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Hi, I have a question regarding the postgresql scripting
@ 2003-08-29 02:44  Bruno Wolff III <bruno@wolff.to>
  parent: Mehrab Erfani <me@vuit.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2003-08-29 02:44 UTC (permalink / raw)
  To: Mehrab Erfani <me@vuit.com>; +Cc: pgsql-admin

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-08-29 02:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-28 22:40 Hi, I have a question regarding the postgresql scripting Mehrab Erfani <me@vuit.com>
2003-08-29 02:44 ` Bruno Wolff III <bruno@wolff.to>

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