From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Bitmead <chris.bitmead@bigfoot.com>
Cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] COPY bug?
Date: Sun, 13 Jun 1999 16:09:42 -0400
Message-ID: <462.929304582@sss.pgh.pa.us> (raw)
In-Reply-To: <3763A267.1049DB7A@bigfoot.com>
Chris Bitmead <chris.bitmead@bigfoot.com> writes:
> Just wondering, when I do a COPY in the latest CVS into a file, it makes
> the file both where I ask it to AND in
> /home/postgres/data/base/<filename>. I've tried removing both files and
> doing it again, and it still happens. The one in /home/postgres looks
> like some kind of binary file.
Can't reproduce it here. Anyone else seeing this?
If you do something like
COPY int4_tbl TO 'int4out';
you will get the file dumped into the database directory, because that
is the current working directory of the backend; you need to give a
full path in this form of the COPY command to get the file put someplace
more useful. But I don't see how COPY could produce two output files
when it's only doing one fopen()...
It occurs to me that it's a very dangerous thing for server-side COPY
to default to storing into the DB directory; pick the name of an
existing table and boom, you just overwrote your table. Maybe the
server-side COPY command ought to insist on being given an absolute
path?
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, chris.bitmead@bigfoot.com, pgsql-hackers@hub.org
Subject: Re: [HACKERS] COPY bug?
In-Reply-To: <462.929304582@sss.pgh.pa.us>
References: <3763A267.1049DB7A@bigfoot.com> <462.929304582@sss.pgh.pa.us>
* 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