Thread: missing data for column

missing data for column

From
tel medola
Date:
Hi.
I tried to import records using the "\copy" or "copy" binary file, but I'm not getting.
The postgres is prompting me that the column is missing, but it is in binary file (already opened it to check).
I tried the command "\copy", "copy". I also tried to pass the columns as a parameter but did not succeed.

Example below:
COPY queue_log FROM '/Central001/queue_log3.bin';

ERROR: missing data for column "callid"
CONTEXT: COPY queue_log, line 1: "PGCOPY"

Could someone please help me?


PS:If there is any way to convert the binary file to text lat would also, because this way I could import in other ways.

Thank you.

Re: missing data for column

From
Adrian Klaver
Date:
On 07/01/2016 01:20 PM, tel medola wrote:
> Hi.
> I tried to import records using the "\copy" or "copy" binary file, but
> I'm not getting.
> The postgres is prompting me that the column is missing, but it is in
> binary file (already opened it to check).
> I tried the command "\copy", "copy". I also tried to pass the columns as
> a parameter but did not succeed.
>
> Example below:
> COPY queue_log FROM '/Central001/queue_log3.bin';

Have you looked at:

https://www.postgresql.org/docs/9.4/static/sql-copy.html

Binary Format


>
> ERROR: missing data for column "callid"
> CONTEXT: COPY queue_log, line 1: "PGCOPY"
>
> Could someone please help me?

If the example you show is complete I do see WITH FORMAT binary
>
>
> PS:If there is any way to convert the binary file to text lat would
> also, because this way I could import in other ways.

Where is the binary file coming from?

>
> Thank you.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: missing data for column

From
tel medola
Date:
Thanks Adrian.

My postgres is crash and I can no longer read the tables. I can no longer climb the base or anything. I just remember that these tables were exported before the crash and with headache, I forgot to pass the correct parameters.

Thanks and sorry.


2016-07-01 17:30 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com>:
On 07/01/2016 01:20 PM, tel medola wrote:
Hi.
I tried to import records using the "\copy" or "copy" binary file, but
I'm not getting.
The postgres is prompting me that the column is missing, but it is in
binary file (already opened it to check).
I tried the command "\copy", "copy". I also tried to pass the columns as
a parameter but did not succeed.

Example below:
COPY queue_log FROM '/Central001/queue_log3.bin';

Have you looked at:

https://www.postgresql.org/docs/9.4/static/sql-copy.html

Binary Format



ERROR: missing data for column "callid"
CONTEXT: COPY queue_log, line 1: "PGCOPY"

Could someone please help me?

If the example you show is complete I do see WITH FORMAT binary


PS:If there is any way to convert the binary file to text lat would
also, because this way I could import in other ways.

Where is the binary file coming from?


Thank you.


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: missing data for column

From
Steve Midgley
Date:
You could experiment (in a sandbox environment!!) with removing columns that are not being found in the backup file (like 'callid') and see if you can get something to load?

Do you remember if there were any DDL statements in the backup? Could you load this backup from into an empty database?

Steve


On Fri, Jul 1, 2016 at 1:20 PM, tel medola <tel.medola@gmail.com> wrote:
Hi.
I tried to import records using the "\copy" or "copy" binary file, but I'm not getting.
The postgres is prompting me that the column is missing, but it is in binary file (already opened it to check).
I tried the command "\copy", "copy". I also tried to pass the columns as a parameter but did not succeed.

Example below:
COPY queue_log FROM '/Central001/queue_log3.bin';

ERROR: missing data for column "callid"
CONTEXT: COPY queue_log, line 1: "PGCOPY"

Could someone please help me?


PS:If there is any way to convert the binary file to text lat would also, because this way I could import in other ways.

Thank you.