Skip site navigation (1) Skip section navigation (2)

Copy command not writing complete data to text file

From: "Kevin Keith" <kevinrkeith(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Copy command not writing complete data to text file
Date: 2005-09-22 13:27:00
Message-ID: BAY108-F3C01D90D6C40145B86928B9970@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I am having some problems with the COPY... to FILE command - and I am 
wondering if anyone has experienced similar problems in the past, and what 
you may have done to resolve the problem?

The platform is Free BSD, Postgres version 7.4.5 and the program triggering 
the COPY command is a CGI script.

I am copying out to a text files using PQexec - there are no more than 500 
records in the tables being copied. What is happening, is one instance of 
the COPY command is always stopping after dumping 16,384 bytes (16K) to the 
text file - the last record is always truncated (i.e. the if the table has 
20 columns, the last record may only have 7 columns in the flat file). There 
is also no error returned in the program - to the program calling the copy 
command everything gives an appearance of working.

What makes this problem difficult to resolve is that if I run the exact same 
COPY command from the PSQL prompt, everything works with no problems.

Disk space is not an issue - there is sufficient memory to store the text 
files many times over.

Has anyone else experienced similar issues, or can you point me to something 
that may be causing this behavior to occur?



FREE pop-up blocking with the new MSN Toolbar  get it now!


pgsql-admin by date

Next:From: Michael FuhrDate: 2005-09-22 14:52:36
Subject: Re: Copy command not writing complete data to text file
Previous:From: Rajesh Kumar MallahDate: 2005-09-22 12:26:01
Subject: Is pgdump_all == pg_dumpall -g + pg_dump of individual databases ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group