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 1i8maR-0002fI-Bk for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 14:30:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8maQ-0007Wt-68 for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 14:30:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8mYQ-0004AS-0P for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 14:28:06 +0000 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8mYM-0003Yx-Vi for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 14:28:05 +0000 Received: by mail-oi1-x242.google.com with SMTP id k20so2794616oih.3 for ; Fri, 13 Sep 2019 07:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=XClz3zAy/Tj5YcVZzzGwr8UgBwYYVbWiRdO3elTW560=; b=OHuNQBfk5xr/hfM8B3ZJ29jcYur7uH1UnyXuCNFnbtGTnYD3yrYggryJjji/AlNP2y 9XPe0hsaZvPgEQ1dIGxB6CgVrqXmS6qmrlzShE6V+ISjWMwkEelrXUOW9LgKgKPlqkQy ymfPG+W0cbCLf/xpP0og/AoXVshSbiq787yKOcxcvhn44Ms7XkGiNmtITP6seUQH/PZ4 aXX2DwBkwdv+djTP37n2KkYtAR6s+VD4pr6EhF21A3Kc+Z5XSSzQEq18hROrt5xGiLm7 kJ5uFTRhSG5xz0lw5Al8eQ27JO7TY6IYl4BlR94P0ACIPL5IssFnYTh3GQsevfSRUPLB UeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=XClz3zAy/Tj5YcVZzzGwr8UgBwYYVbWiRdO3elTW560=; b=pcR/cBl3CmuP1vpgy5/2VXs2WttniKs5jONDaeRlhh0NSTUGkiad1aNVAccutZuVBV t2a2WgXygP5n3Vo4pvI7yt/3kFTYBiVLBkK5GjrZTDtxvzrAafNxC4rQqdcygtQ5BUVz dteBCiBi0GKXaEwSZpRIZ/zdovyTLgm78KJTzDWqmE0mmXfX7CYBq7vrbCnqI7snG9Ar 1XTaTE6zbRGMzCZTqaegEBVMrgQATUXWMpSag2j7SMDOr6iWkTNPJr1b2Q+ZPr5wOOfZ MEFhpXKDt3kOnR3ENlOdBNhRD6cZqZF5kNIhUZYrxQei41+HJWu2tJ4PmwFNEcY9UyUD qSww== X-Gm-Message-State: APjAAAUCjrUJJHHPJnBoznd+i8HXhP/Yk0imFO5ONHXcbPrvjHXziKuH 0nzD5heZCp+hIlGUWoThBPq/mhf3cB+/rQ== X-Google-Smtp-Source: APXvYqyBq2m4hhh0fnGctvoDRO2bc6G8IbGwo3E7hG7+LkceRE7Cm18mQjHpUntbJJPs7KsplfYz6g== X-Received: by 2002:aca:4988:: with SMTP id w130mr3677981oia.108.1568384880307; Fri, 13 Sep 2019 07:28:00 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id 93sm10937355ota.16.2019.09.13.07.27.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2019 07:27:59 -0700 (PDT) Subject: Re: backing up the data from a single table? To: pgsql-general@lists.postgresql.org References: <20190913141351.GC27035@panix.com> From: Ron Message-ID: Date: Fri, 13 Sep 2019 09:27:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190913141351.GC27035@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/13/19 9:13 AM, stan wrote: > My development methodology is to create scripts that init the db, and load > test data, as I make changes. > > Now, I am starting to move toward a test instance with real data. The end > user has provided "real" test data, n spreadsheets. I have the inputing of > data from these working OK. (takes a bit of hand work). What I would like > to do, is continue to init the "test" database. To make that easy, I would > like to be able to "export" individual tables, so I can use the scripts to > reload them. I prefer not to have to convert these to my load script > format. > > Is there a way to "export" a single table, that can be easily re > "imported"? The COPY command is what you want. http://postgresguide.com/utilities/copy.html https://www.postgresql.org/docs/9.6/sql-copy.html -- Angular momentum makes the world go 'round.