X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1E2453A2B46 for ; Tue, 18 Jan 2005 23:43:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87028-06 for ; Tue, 18 Jan 2005 23:43:51 +0000 (GMT) Received: from mail.imsa.edu (n1x6.imsa.edu [143.195.1.6]) by svr1.postgresql.org (Postfix) with ESMTP id 74B1B3A2B3C for ; Tue, 18 Jan 2005 23:43:52 +0000 (GMT) Received: from n1x6.imsa.edu (localhost [127.0.0.1]) by mail.imsa.edu (Postfix) with SMTP id 494F5BA88B; Tue, 18 Jan 2005 17:43:52 -0600 (CST) Received: from mail.imsa.edu ([127.0.0.1]) by n1x6.imsa.edu ([143.195.1.6]) with SMTP (gateway) id A07AD8452B8; Tue, 18 Jan 2005 17:43:52 -0600 Received: from [143.195.253.75] (cif21-15218.admin.imsa.edu [143.195.253.75]) by mail.imsa.edu (Postfix) with ESMTP id 88A5BBA894; Tue, 18 Jan 2005 17:43:51 -0600 (CST) Message-ID: <41ED9F37.6020403@imsa.edu> Date: Tue, 18 Jan 2005 17:43:51 -0600 From: Gautam Saha User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Using COPY for bulk upload in a table with sequence field Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200501/195 X-Sequence-Number: 16054 Hi: Can I use COPY command to upload a flat text file into a PG table where the PK column (item_id) is Serial type. The table is an existing table with data and I want to insert new rows from the flat file. The sequence already defined for this column. If I do not have the item_id data in my flat file, is it going to get the id from nextval from the sequence? Any help is appreciated. Gautam