pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Keith <kevinrkeith@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: Copy command not writing complete data to text file
Date: Thu, 22 Sep 2005 08:27:00 -0500
Message-ID: <BAY108-F3C01D90D6C40145B86928B9970@phx.gbl> (raw)

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?

Thanks,

Kevin

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




view thread (4+ messages)  latest in thread

Message-ID: <BAY108-F3C01D90D6C40145B86928B9970@phx.gbl>
Permalink:  ../BAY108-F3C01D90D6C40145B86928B9970@phx.gbl/
Also on:    postgresql.org/message-id/BAY108-F3C01D90D6C40145B86928B9970@phx.gbl

 · 

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-admin@postgresql.org
  Cc: kevinrkeith@hotmail.com
  Subject: Re: Copy command not writing complete data to text file
  In-Reply-To: <BAY108-F3C01D90D6C40145B86928B9970@phx.gbl>
  References: <BAY108-F3C01D90D6C40145B86928B9970@phx.gbl>

* 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