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

COPY from files does not work

From: "Llew" <postgres(at)lg(dot)ndirect(dot)co(dot)uk>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: COPY from files does not work
Date: 2001-11-06 20:53:09
Message-ID: 9s9ijm$gt1$ (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I am using pq++ and am having problems getting the COPY command to work. I
am using this to inport huge files (700 Mb) at a time. The thing is if I do
it manually or even via psql, the same SQL commands work. The really odd
thing is that this fails:
CREATE TABLE temp1 (a integer, b integer);
COPY BINARY temp to '/local/temp_table.bin'
COPY BINARY temp from '/local/temp_table.bin'

I am calling PgDatabase.ExecCommandOk and getting error messages like
ERROR: copy: line 18, COPY BINARY: unexpected EOF
ERROR: COPY BINARY: file signature not recognized

Help! Does the C/C++ library bindings force postgresql to look in odd places
for COPY or something. I am at my wits end.



pgsql-interfaces by date

Next:From: Michael LamDate: 2001-11-06 21:23:33
Subject: pqreset?
Previous:From: Hannu KrosingDate: 2001-11-05 20:17:29
Subject: Re: tables invisible to pSQL

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