pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: john polo <jpolo@mail.usf.edu>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Find missing data in a column
Date: Wed, 29 Dec 2021 10:10:48 -0800
Message-ID: <E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com> (raw)
In-Reply-To: <8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com>
References: <ff98e797-4d49-9ffb-6e60-e9dfdc72cd6f@mail.usf.edu>
	<8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com>



> 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="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?
> 
> 
> If you want to use psql then:
> 
> pg_dump.exe" --file="C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt" --host="localhost" --port="5432" --username="postgres" --password --no-owner --no-privileges --dbname="ebird_work" --table="p_loc.ebd_sptl" --data-only
> 
> psql ebirds
> 
> 
> \i C:\Users\Nightrunner\DOCUMENTS\programming\pg_out\ebird_sptl_all.txt
> 

Doesn’t 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 <mailto:adrian.klaver@aklaver.com>

view thread (8+ messages)  latest in thread

Message-ID: <E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com>
Permalink:  ../E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com/
Also on:    postgresql.org/message-id/E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com, adrian.klaver@aklaver.com, jpolo@mail.usf.edu
  Subject: Re: Find missing data in a column
  In-Reply-To: <E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com>
  References: <ff98e797-4d49-9ffb-6e60-e9dfdc72cd6f@mail.usf.edu> <8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com> <E7A24DAF-9818-4D5B-9566-76A46D98E457@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox