Re: Find missing data in a column

From: Alan Hodgson <ahodgson(at)lists(dot)simkin(dot)ca>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Find missing data in a column
Date: 2021-12-29 18:36:43
Message-ID: 1971db2f89d2e09d4a03533d4d4fcf6896acc855.camel@lists.simkin.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ourdiaspora 2021-12-29 21:08:21 csv copy error
Previous Message Adrian Klaver 2021-12-29 18:16:35 Re: Find missing data in a column