X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B89F99F9CAA for ; Tue, 13 Jun 2006 01:11:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 17535-08 for ; Tue, 13 Jun 2006 01:11:46 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 93B019F9316 for ; Tue, 13 Jun 2006 01:11:45 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so325840ugf for ; Mon, 12 Jun 2006 21:11:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=tEDqBipnn3ACH979ihOL34QU24s6F4UNy0kie8BwTuxvC9F9nemlk196o+4PA1SV73CHE3SbpigjjenAhRljm4tZ+VkMuk6frGy1D3eZJmMK9Ob0nQRAsG9i1MOmLr0DYEutzIBl4yH9YKmmZ0cJT5VW/yZZxbsjKM+27YalWLw= Received: by 10.67.105.19 with SMTP id h19mr5906205ugm; Mon, 12 Jun 2006 21:11:43 -0700 (PDT) Received: by 10.67.20.12 with HTTP; Mon, 12 Jun 2006 21:11:43 -0700 (PDT) Message-ID: Date: Mon, 12 Jun 2006 23:11:43 -0500 From: "Aaron Bono" To: pgsql-sql@postgresql.org Subject: Re: COPY to table with array columns (Longish) In-Reply-To: <008801c68e98$0cb1a620$9b0014ac@ITPhil> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <008801c68e98$0cb1a620$9b0014ac@ITPhil> X-Google-Sender-Auth: e9fafa4abda11e6d X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/130 X-Sequence-Number: 25366 I think two tables should suffice: ZKCOST and ZPRECMPL. So you would have ZKCOST zkcost_id, zkcost_value and ZPRECMPL zkcost_id, zprecmpl_id, zprecmpl_value where zkcost_id is the primary key for ZKCOST and zkcost_id, zprecmpl_id together are the primary key for ZPRECMPL and zkcost_id is a foreign key from ZPRECMPL to ZKCOST. That will work won't it? -Aaron On 6/12/06, Phillip Smith wrote: > So you're suggesting creating a child table for each SYS record? Ie, a table called "ZPRECMPL" etc?