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 1n2dos-0003wX-PK for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 18:37:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2dor-0002XK-Ia for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 18:37:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2dor-0002XA-0X for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 18:37:01 +0000 Received: from outbound1a.ore.mailhop.org ([54.213.22.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2dok-0002ur-IF for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 18:36:59 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1640803014; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=WO3ph/bCp8b13l2YxbdV15t/jMF3RWxegRgieWQ9yldzuPzR/+CHa+GKyWMqDonQ9yFHP5HK8h6VX nwcI+If4LYKO4/FKgdTQ250U0D59DA2iVVzI53kg0PH8wjuCv+5UzCYm5JMuMzvMGUYIj9FurcNZjT 8j1r4KL/AyKPRQieVvj6fXzdJTxxgPoUEpmQSPLj/VOzJR9CYW2aMZMK0hQhPYxnjzxjwoB4j+qAsi koAAZSAflyN8+AsAG42n+aZ8+yfZvXP8RRoEetiRXK66WubjifVDh9OulVQIhLH/qv9eG5ItWed/O7 D6TISMoS6xkzkYug+oOEx/Hq2YS0Ofg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:dkim-signature:dkim-signature:dkim-signature:from; bh=DDqkZBeRWXVRcOELmUr0P7RXeOXNZtAbIkUHnZ/oZGM=; b=Dk2OO6nEnJWLtUsUTdi7t6DOhYRV1koNUdo7J/2EiZ2soZLcCR4uICHp7bydAChoAJMcUPbfCp88J yusF/Two/YLsqklctWTcE8JarqW+Y06HU79ColxkdNdYqGJSB9I6FdsDiE+JuIaOvw5+UqGc3yrTvq WlkzGZ+0a/hj7v4qLZJ9BMnoSM3ecBIvlN1nzlDHQNa1ANYUnEboIwxsZ090TxXi85lzk9nPd/wSML MdShubcQiYqSqAcfNOGYjc+4CFepGT1WdSWlAvtDe7vMicLfLZ+w6/prAkv/LUnPwlw4zyTv/fGHki XGwJj5Kiu6ldyql9xjmvPmt3hos6yBg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=pass smtp.mailfrom=lists.simkin.ca smtp.remote-ip=172.105.109.24; dkim=pass header.d=lists.simkin.ca header.s=athena header.a=rsa-sha256 header.b=NvROlFq5; dmarc=pass header.from=lists.simkin.ca; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.simkin.ca; s=duo-1610662143981-d3c4c825; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:from; bh=DDqkZBeRWXVRcOELmUr0P7RXeOXNZtAbIkUHnZ/oZGM=; b=UaQ4s9YDTqoCTSyOSUh7NoPKUPtzYcopRJGtp+0x3Ee0rzM+9z0pGJZY3p4nK8xAeCYtuvCLz/l37 5yTRIfp43EozxF7tu/foPFKcoYB9iVGhqjvjpSkthb38Ac0vFND7nXxrzSsz0MD6z+sgEx2eOR28dR z0Brxiv65dspf6nQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:from; bh=DDqkZBeRWXVRcOELmUr0P7RXeOXNZtAbIkUHnZ/oZGM=; b=JHmJHcLzPOTodHtMO/eZu3QD0knBWxm6aWEhuMDXN0uIN/aW9nLr9mGILZmlIajbAO/NgJ/95ad1B tLDpHChC9OVlvhcFXSZBQFOs8pT6hD5WAu11R5R/YeBaT+PWnFaei8jk3BwtWPM6TnOlYEh1pnVp0l 58rs5SNDjZh/qOWpigc5e80stsyYfAYc4AiAibFOVloNyrqM0zvxMvotRrCDDSfLRAAFDK2HOKCyay hVFkaaf4YadvqRqG2dD7N1FeNDG8bU7GTgWrGhxUc0s8yqGwpcInb9mX6ziqE2u8yZ2APjwOP7kkog nx15ue9DOTaVis7gSQzuJq8gpv6V83w== X-Originating-IP: 172.105.109.24 X-MHO-RoutePath: c2lta2lu X-MHO-User: 49b21f23-68d6-11ec-9790-bf9d68d023b6 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from athena.simkin.ca (athena.simkin.ca [172.105.109.24]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 49b21f23-68d6-11ec-9790-bf9d68d023b6; Wed, 29 Dec 2021 18:36:52 +0000 (UTC) Received: from skynet.simkin.ca (node-1w7jr9sr73xr4ze19xwgjcteu.ipv6.telus.net [IPv6:2001:569:bce0:6400:fa75:a4ff:fe2f:92e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id C0B0AC69CA42 for ; Wed, 29 Dec 2021 10:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1640803006; bh=fvvoXtIm2D24XkqSUa7LaYNvcn3X8JOCgORZ3KXSthM=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=NvROlFq5shze+0WVTHhtY/cXc60mfy/I/EsM9UUSsgblOElv+3VNV2gikF6wIbbHx Fp4myhFIGF7ptVqdMRe6xDUKiXTXWa+W+ALtgTMRu4ILv6AgW+trdZsXqACc4plQbv Lm7CPb10qPKQiZer6o/P3uy79DKFYJT7LvqKva4B17jemDEMyLZtqB8ELdWnmiKdhH NGnLR/gn87eH6/XCL+GiVbPba+0LgTmMOhhwIT0VjTH1ahVunBRqurYUWBFg6dbELQ tFD2lnNY6NUoVgPlzwdwrq1eKQtHpn2LnVnDTMgmExcbbBA08qgQJdxayDtErpUYNo wMFb1SypkNU7Q== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id 03345105ACE42 for ; Wed, 29 Dec 2021 10:36:43 -0800 (PST) Message-ID: <1971db2f89d2e09d4a03533d4d4fcf6896acc855.camel@lists.simkin.ca> Subject: Re: Find missing data in a column From: Alan Hodgson To: pgsql-general@lists.postgresql.org Date: Wed, 29 Dec 2021 10:36:43 -0800 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-KlFz2g85ovC5+8FqPWOS" X-PGP-Key: fp="EF82 6F8D A3BA A096 FFA3 05F2 A7A0 40A5 34E5 AA0B"; id="0x34E5AA0B"; get= User-Agent: Evolution 3.40.4 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-KlFz2g85ovC5+8FqPWOS Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 8bit On Wed, 2021-12-29 at 12:43 -0500, john polo wrote: > 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? You're going to want to look into the pg_restore command to restore a custom format dump file. If you wanted something to read with COPY FROM you would first dump it with COPY TO. --=-KlFz2g85ovC5+8FqPWOS Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Wed, 2021-12-29 at 12:43 -0500, john polo = wrote:
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
th= is command to get the data out of the Windows database:

<= /div>
"C:\Program Files\PostgreSQL\12\bin\pg_dump.exe"
-= -file=3D"C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.d= ump"
--host=3D"localhost" --port=3D"5432" --username=3D"post= gres" --password
--verbose --format=3Dc --no-owner --no-priv= ileges --dbname=3D"ebird_work"
--table=3D"p_loc.ebd_sptl"

On Slackware, I first:

<= div>su postgres

Then try:

psql ebirds

SET SEARCH_PATH TO p_loc;=

COPY p_loc.ebird_sptl FROM
'/n= t-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. Th= is is a column of text. How do I find the error(s)
in questi= on?

You're going to want to look = into the pg_restore command to restore a custom format dump file.

If you wanted something to read with COPY FROM you would fi= rst dump it with COPY TO.
--=-KlFz2g85ovC5+8FqPWOS--