pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedCOPY bug?
2+ messages / 2 participants
[nested] [flat]
* COPY bug?
@ 1999-06-13 12:21 Chris Bitmead <chris.bitmead@bigfoot.com>
0 siblings, 1 reply; 2+ messages in thread
From: Chris Bitmead @ 1999-06-13 12:21 UTC (permalink / raw)
To: pgsql-hackers@hub.org
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.
This is latest CVS.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [HACKERS] COPY bug?
@ 1999-06-13 20:09 Tom Lane <tgl@sss.pgh.pa.us>
parent: Chris Bitmead <chris.bitmead@bigfoot.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 1999-06-13 20:09 UTC (permalink / raw)
To: Chris Bitmead <chris.bitmead@bigfoot.com>; +Cc: pgsql-hackers@hub.org
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-06-13 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-13 12:21 COPY bug? Chris Bitmead <chris.bitmead@bigfoot.com>
1999-06-13 20:09 ` Tom Lane <tgl@sss.pgh.pa.us>
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