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 1n2dPg-00028D-Mr for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 18:11:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2dPf-0002bY-9K for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 18:10:59 +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 1n2dPe-0002bJ-Ky for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 18:10:58 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n2dPZ-0002kO-FO for pgsql-general@postgresql.org; Wed, 29 Dec 2021 18:10:57 +0000 Received: by mail-pf1-x431.google.com with SMTP id t19so19308619pfg.9 for ; Wed, 29 Dec 2021 10:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=G3Mpy5lcK0iNcpOxZ8J8T72PSAAi78V6kHeEGb2HBA4=; b=XraebyR/sW2EgSEX/KF+NZHRp8n57VffMy01inEiBLm74bEpBAzctF6p6p6n9cMFY6 q6hP+7mRohKD9cDkQ4JLIKNxR57/sqrYp93yKtjm5OjvhG9IXNaHhEKcNFLE9uOFbHm1 C3z2onLQktdl4qfK3GK/42wxbKfBnYyyjpo4cVTp5ticmdRvLVoiCHoK6M/9/inKVVTY F5gPdLYs83xFIL87eXIbZNtRUG8QkN6pqNcYUg+gPsk4xC2N1JIeDrDkVe0Amt0oXmxA +258zr1rIubMt2PNPZ+Aojo4ZsUj1vct0ovDMl4Ti0/ZD7VxqE4KZLnYV2jKPWWbNrlF 0Z6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=G3Mpy5lcK0iNcpOxZ8J8T72PSAAi78V6kHeEGb2HBA4=; b=wHQi5mi39lLYieCh7RWWHgwK8m43aFKF29EBuqHgFa8tUTxWUrtT0u5DvhdP6pgJ6k KMWBD76hKd2g8HzJYUd2pBc5TrI0bhAamSlJtbOMCJp+uxZo+oAZxcuRjEV9dIyuGNtt Nz9Kbsv/occw5kW7X4YIfRMPq8x4DzzzJGDOTxCfkZt3vSzfC4noJdK64lfr6i95uMWx wIGmVWz+oChgvlBLGHP/PBn0XSuGXspv7chkqGUN3qjZ1iy5lpzCX9D3nfgxCQN99J0K 4fP4tz29uE/b0sKnyGNczty0QDkBBiwKazSjQnFdmODWzI2nMU2DlON+P1iuZ5kLurUD HEaw== X-Gm-Message-State: AOAM530g8/SeM1zeuYE+C39jpPQ1ynfsEe0muvGijbA7hSzV9S0j5vdY orV9zKK8nZXnCcOUbfIMNWI= X-Google-Smtp-Source: ABdhPJzPrGx5GASWk1bE+1l0t1qMLywNFKZdkuCFOj/1YaDiv1Ao+zNTrvxY6W/pHuAZuc2TY5pnjA== X-Received: by 2002:a63:cf04:: with SMTP id j4mr23978705pgg.278.1640801452093; Wed, 29 Dec 2021 10:10:52 -0800 (PST) Received: from smtpclient.apple (node-1w7jr9qlb540yf2wu4dlyp076.ipv6.telus.net. [2001:569:74c5:2c00:e99f:8d7:f153:7342]) by smtp.gmail.com with ESMTPSA id h5sm24510267pfi.46.2021.12.29.10.10.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Dec 2021 10:10:51 -0800 (PST) From: Rob Sargent Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_979F7D6A-AED9-463A-B320-13083FB3E533" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Find missing data in a column Date: Wed, 29 Dec 2021 10:10:48 -0800 In-Reply-To: <8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com> Cc: john polo , "pgsql-general@postgresql.org" To: Adrian Klaver References: <8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com> X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_979F7D6A-AED9-463A-B320-13083FB3E533 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 29, 2021, at 10:07 AM, Adrian Klaver = wrote: >=20 > 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=3D"C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all= .dump" --host=3D"localhost" --port=3D"5432" --username=3D"postgres" = --password --verbose --format=3Dc --no-owner --no-privileges = --dbname=3D"ebird_work" --table=3D"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? >=20 >=20 > If you want to use psql then: >=20 > pg_dump.exe" = --file=3D"C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all= .txt" --host=3D"localhost" --port=3D"5432" --username=3D"postgres" = --password --no-owner --no-privileges --dbname=3D"ebird_work" = --table=3D"p_loc.ebd_sptl" --data-only >=20 > psql ebirds >=20 >=20 > \i = C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt >=20 Doesn=E2=80=99t that presume OP can connect to linux db from Windows = machine? Seems the best plan would be copy to; file-tranfer; copy from >=20 >=20 >> Cheers, >> John >=20 >=20 > --=20 > Adrian Klaver > adrian.klaver@aklaver.com --Apple-Mail=_979F7D6A-AED9-463A-B320-13083FB3E533 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Dec 29, 2021, at 10:07 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

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=3D"C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all= .dump" --host=3D"localhost" --port=3D"5432" --username=3D"postgres" = --password --verbose --format=3Dc --no-owner --no-privileges = --dbname=3D"ebird_work" --table=3D"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?


If you want = to use psql then:

pg_dump.exe" = --file=3D"C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all= .txt" --host=3D"localhost" --port=3D"5432" --username=3D"postgres" = --password --no-owner --no-privileges --dbname=3D"ebird_work" = --table=3D"p_loc.ebd_sptl" --data-only

psql ebirds


\i = C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt


Doesn=E2=80= =99t that presume OP can connect to linux db from Windows machine? =  Seems the best plan would be copy to; file-tranfer; copy from


Cheers,
John


-- 
Adrian = Klaver
adrian.klaver@aklaver.com

= --Apple-Mail=_979F7D6A-AED9-463A-B320-13083FB3E533--