Received: from www.wgcr.org (www.wgcr.org [206.74.232.194]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0ILu6014364 for ; Thu, 18 Jan 2001 16:56:06 -0500 (EST) (envelope-from lamar.owen@wgcr.org) Received: from wgcr.org ([10.1.2.1]) by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id QAA13374; Thu, 18 Jan 2001 16:56:07 -0500 Message-ID: <3A67666B.423F14CF@wgcr.org> Date: Thu, 18 Jan 2001 16:55:55 -0500 From: Lamar Owen X-Mailer: Mozilla 4.73 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: Adam Lang CC: pgsql-interfaces@postgresql.org Subject: Re: imorting csv files into postgres References: <3A67568B.59572A40@wgcr.org> <020401c08196$40c677c0$330a0a0a@6014cwpza006> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/208 X-Sequence-Number: 826 Adam Lang wrote: > Yeah, but he doesn't want to have to create the table before hand, he wants > postgresql to do all the work. ;) > The only way that I know of to do that is write a program and feed it the > CSV file... but in the program it is going to need to create the table. I have such a script for AOLserver Tcl that does all the work. But it requires a working AOLserver/PostgreSQL installation, which will take longer to set up than a simple perl script would take to be written. The hard part is the CSV parsing -- creating the table and filling in the data is easy in comparison, especially in the Pg perl interface. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11