Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0XxB-0000vh-2P for pgsql-general@arkaria.postgresql.org; Wed, 21 Aug 2019 21:15:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0Xx9-0003bv-T5 for pgsql-general@arkaria.postgresql.org; Wed, 21 Aug 2019 21:15:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0Xx9-0003Lp-DM for pgsql-general@lists.postgresql.org; Wed, 21 Aug 2019 21:15:35 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i0Xx6-0004zQ-5p for pgsql-general@postgresql.org; Wed, 21 Aug 2019 21:15:33 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46DL6V5KVdz1kKD for ; Wed, 21 Aug 2019 17:15:30 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46DL6V4Mhhz1ZVM; Wed, 21 Aug 2019 17:15:30 -0400 (EDT) Date: Wed, 21 Aug 2019 17:15:30 -0400 From: stan To: pgsql-general@postgresql.org Subject: Importing from CSV, auto creating table? Message-ID: <20190821211530.GA1292@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I have a situation where we need to import data, as an interim measure, from spreadsheets. I have read up on \copy and COPY, but I do not see that either of these can use the header from a CSV file to define a new table. Am I missing something? Also downloaded something called pgfutter, which I thought would do this, but have not had any success with this. After I (thought) I had figured out the arguments, it just seams to hag forever. -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin