Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2dBS-0001MK-EL for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 17:56:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2dBR-00030d-Ba for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 17:56:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2dBO-00030U-Tu for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 17:56:17 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2dBK-0008Nq-EN for pgsql-general@postgresql.org; Wed, 29 Dec 2021 17:56:14 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 2E1AA3200F7C; Wed, 29 Dec 2021 12:56:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 29 Dec 2021 12:56:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=D 3ql8GBBzNL5Y2OlXpr0Res6DM6bO0qaGl+SQK6Mp/4=; b=vjtHBP80HQ6054O25 nZMLEJCUIYxyJlnAVmWRcFym+yRozGSTbQvB6IMZHlu2FBS2AoMdY6lyBI/5ArIQ soczfJuca6+nRXoBc1AjUkPqorAOO+ZAJPbkbPDBL2V3bKiO3Bwl4yap+lcGUI91 JQV1nNRpaMEtFydp2KhmPHM72G8TIKCU/FuZpyTaSlUCOIc7Ux2jqHvgRifFdVxs UPxeDuxE/Yk+/mOYOLq8ykBd4uMnNvDpEBvAvAmodW2VsX36iZoXPVazsJi57hUn S8+pAPg24n+blHVPgkCGpX5EyPwbeii02lIDVkBxy7+cxLukEURfI5WspMPVAH8o iWCkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=D3ql8GBBzNL5Y2OlXpr0Res6DM6bO0qaGl+SQK6Mp /4=; b=B6gv31Z4Zrqfz2Kql2SowgGAOdmtQzkFlcMIEEyLCJpYho3vrpG+23ZMr 6mpf4hT13o1yMEQEbSQAga9+hPPv5wpThI4WB7YZtOo7El97HQIOh5VNUM7XuuAS BYJ4vMhpGlAsZ+2jvqFc+cc+OU11LYs3joGDle98XI4lsoswGQoHfQdmEnQFG3/t Ow6t6xCKI6ZA61EtV0PEZVZVIPGjQFhfvCClc9hu6l5adSjltPw6ACa/Cf08F12G bTLuEhlnN8E8MOIQ9da3YzSEkbdagccS6zJLmfbSabnMZQQBNAGxeHCM1lEXCqvP 8J87qjQy/bLbVzrQtCWMP7hKejmRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvuddguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepffduhedtudeggfekveduffehveevhfeftedthfev iedvgfeigefhieeugefggfegnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Dec 2021 12:56:05 -0500 (EST) Message-ID: Date: Wed, 29 Dec 2021 09:56:04 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: Find missing data in a column Content-Language: en-US To: john polo , pgsql-general@postgresql.org References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/29/21 09:43, john polo wrote: > Hi, > > I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 rows. > I want to copy this database to PostgreSQL 10 on Slackware Linux. I used > this command to get the data out of the Windows database: > > "C:\Program Files\PostgreSQL\12\bin\pg_dump.exe" > --file="C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.dump" > --host="localhost" --port="5432" --username="postgres" --password > --verbose --format=c --no-owner --no-privileges --dbname="ebird_work" > --table="p_loc.ebd_sptl" > > On Slackware, I first: > > su postgres > > Then try: > > psql ebirds > > SET SEARCH_PATH TO p_loc; > > COPY p_loc.ebird_sptl FROM > '/nt-d/projects_and_data/ebd_OR/ebird_sptl_all.dump'; > > That fails with > > missing data for column "COMMON_NAME" > > I understand this means there is a problem with one or more rows in the > column referenced. This is a column of text. How do I find the error(s) > in question? How did you think this would work at all? --format=c is compressed custom binary format COPY p_loc.ebird_sptl FROM '/nt-d/projects_and_data/ebd_OR/ebird_sptl_all.dump'; Is looking for separated value text format file. Look at pg_restore: https://www.postgresql.org/docs/current/app-pgrestore.html > > Cheers, > > John > -- Adrian Klaver adrian.klaver@aklaver.com