pg.ddx.io  pgsql-chat@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nico King <nico_king2002@yahoo.com>
To: pgsql-chat@postgresql.org
Subject: Question about Scripting in Postgresql.
Date: Thu, 4 Sep 2003 17:00:57 -0700 (PDT)
Message-ID: <20030905000057.60760.qmail@web21306.mail.yahoo.com> (raw)


Note: forwarded message attached.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Here is the problem I have some key tables that I need
to import some data into it.I can't go ahead and 
write "insert into table value()"for over 40 different
tables and over 100s of rows and columns

The reason that I have to write a script to enter the
data into the tables is that what if I have to enter
1000 lines of data into 200 rows??
here is a piece of my script that works but not when I
enter lets' say a char instead of integer.
=========================================================
copy accounts from stdin using delimiters ',';
1,pass,mac,,,
2,pass2,mac2,ip,test
0,pass2,mac2,ip,test2
\.
=======================================================
P.S: also I have used the tab delimiter.

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 proceed with importing the rest of the
data into the next record even though some are
corrupted,'cause I get intrupted as soon as there is
an error in inserting the data?

 

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Message-ID: <20030905000057.60760.qmail@web21306.mail.yahoo.com>
Permalink:  ../20030905000057.60760.qmail@web21306.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030905000057.60760.qmail@web21306.mail.yahoo.com

 · 

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-chat@postgresql.org
  Cc: nico_king2002@yahoo.com
  Subject: Re: Question about Scripting in Postgresql.
  In-Reply-To: <20030905000057.60760.qmail@web21306.mail.yahoo.com>
  References: <20030905000057.60760.qmail@web21306.mail.yahoo.com>

* 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