X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 87642D1D621 for ; Mon, 19 Apr 2004 11:53:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 52821-06 for ; Mon, 19 Apr 2004 11:54:01 -0300 (ADT) Received: from mailhub2.sghms.ac.uk (firewall.sghms.ac.uk [194.82.50.2]) by svr1.postgresql.org (Postfix) with ESMTP id B898AD1D08E for ; Mon, 19 Apr 2004 11:53:56 -0300 (ADT) Received: from [194.82.51.24] (helo=imail) by mailhub2.sghms.ac.uk with esmtp (Exim 4.24) id 1BFa9j-0001uL-Js for pgsql-php@postgresql.org; Mon, 19 Apr 2004 15:53:55 +0100 Received: from [172.16.20.3] (mrc1-003.sghms.ac.uk [172.16.20.3]) by imail.sghms.ac.uk (iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)) with ESMTPA id <0HWF00K3CAPVN6@imail.sghms.ac.uk> for pgsql-php@postgresql.org; Mon, 19 Apr 2004 15:53:55 +0100 (BST) Date: Mon, 19 Apr 2004 15:53:11 +0100 From: Adam Witney Subject: Uploading and parsing a file into a table To: pgsql-php Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT User-Agent: Microsoft-Entourage/10.1.1.2418 X-MailScanner-Information: Please contact sysadmin at sghms.ac.uk for more information X-MailScanner-MH2: No Virues detected X-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.9, required 5, autolearn=not spam, APARENTLY_FROM_MYSELF 1.00, BAYES_00 -4.90, FROM_SGHMS -1.00) X-MailScanner-From: awitney@sghms.ac.uk X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/28 X-Sequence-Number: 2685 Hi, I have to build a web form to upload data files (approx 50 columns, 10,000 rows) and then parse them into a table. I can open and parse the files in PHP and slurp them into the table using COPY, but I was just wondering if this is the best way to do this? Also I may have to be able to upload several of them at a time, do you think the PHP/COPY method would scale well to up to 10 files? Would this be the fastest method? Thanks for any advice adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.