X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8EA4ED1B52C for ; Thu, 25 Sep 2003 16:51:32 +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 27185-04 for ; Thu, 25 Sep 2003 13:51:02 -0300 (ADT) Received: from hatch.sonalysts.com (hatch.sonalysts.com [198.6.208.3]) by svr1.postgresql.org (Postfix) with ESMTP id B61E9D1B507 for ; Thu, 25 Sep 2003 13:51:00 -0300 (ADT) Received: from sonalysts.com (fwuser@sentry.sonalysts.com [198.6.208.103]) by hatch.sonalysts.com (8.9.0/8.9.0) with ESMTP id MAA27835; Thu, 25 Sep 2003 12:50:56 -0400 (EDT) Message-ID: <3F731CF0.2090800@sonalysts.com> Date: Thu, 25 Sep 2003 12:50:56 -0400 From: "P.J. \"Josh\" Rovero" Organization: Sonalysts, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Dave [Hawk-Systems]" Cc: pgsql-general@postgresql.org Subject: Re: populate table with large csv file References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1627 X-Sequence-Number: 49846 Dave [Hawk-Systems] wrote: > aside from parsing the csv file through a PHP interface, what isthe easiest way > to get that csv data importted into the postgres database. thoughts? Assuming the CSV file data is well formed, use psql and the COPY command. In psql, create the table. Then issue command: copy from 'filename' using delimiters ','; -- P. J. "Josh" Rovero Sonalysts, Inc. Email: rovero@sonalysts.com www.sonalysts.com 215 Parkway North Work: (860)326-3671 or 442-4355 Waterford CT 06385 ***********************************************************************