Re: Find missing data in a column - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Find missing data in a column
Date
Msg-id 8849982a-c708-57f1-5e2e-66e91e0e47b4@aklaver.com
Whole thread Raw
In response to Find missing data in a column  (john polo <jpolo@mail.usf.edu>)
Responses Re: Find missing data in a column  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
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



> 
> Cheers,
> 
> John
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Find missing data in a column
Next
From: Rob Sargent
Date:
Subject: Re: Find missing data in a column