X-Original-To: pgsql-chat-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 66063D1B89A for ; Fri, 5 Sep 2003 00:01:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 61836-10 for ; Thu, 4 Sep 2003 21:00:57 -0300 (ADT) Received: from web21306.mail.yahoo.com (web21306.mail.yahoo.com [216.136.129.60]) by svr1.postgresql.org (Postfix) with SMTP id 10F39D1B53A for ; Thu, 4 Sep 2003 21:00:54 -0300 (ADT) Message-ID: <20030905000057.60760.qmail@web21306.mail.yahoo.com> Received: from [63.200.221.250] by web21306.mail.yahoo.com via HTTP; Thu, 04 Sep 2003 17:00:57 PDT Date: Thu, 4 Sep 2003 17:00:57 -0700 (PDT) From: Nico King Subject: Question about Scripting in Postgresql. To: pgsql-chat@postgresql.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1050941389-1062720057=:60647" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1 X-Sequence-Number: 12 --0-1050941389-1062720057=:60647 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Note: forwarded message attached. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --0-1050941389-1062720057=:60647 Content-Type: message/rfc822 Received: from [63.200.221.250] by web21308.mail.yahoo.com via HTTP; Thu, 04 Sep 2003 16:24:06 PDT Date: Thu, 4 Sep 2003 16:24:06 -0700 (PDT) From: Nico King Subject: Question about Scripting in Postgresql. To: pgsql-hackers@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 649 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 --0-1050941389-1062720057=:60647--