Thread: General Bug Report: psql 'copy' command access server filesystem rather that the client

============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Mark Stosberg
Your email address      : mark@summersault.com

Category                : runtime: front-end
Severity                : non-critical

Summary: psql 'copy' command access server filesystem rather that the client

System Configuration
--------------------
  Operating System   : FreeBSD

  PostgreSQL version : 6.4

  Compiler used      :

Hardware:
---------
FreeBSD nollie.summersault.com 2.2.8-RELEASE FreeBSD 2.2.8-RELEASE #0: Thu Dec 17 19:37:50 EST 1998
    root@:/usr/src/sys/compile/NOLLIE.121898  i386

Versions of other tools:
------------------------


--------------------------------------------------------------------------

Problem Description:
--------------------
In having trouble copy a table in from a tab-deliminated file, I discovered that psql was accessing the file system of
thepostgres server host, rather than my local host. While either way could be considered 'correct', it seems more
logicaland convenient to me to access the client filesystem. One case for this is the scenerio in which the DBA is the
onlyone with a login in the postgres server, in which case I can't even move my files to the server to import them.  
   If there is a good reason for accessing the server filesystem with "copy", I would appreciate a pointer for
importingfiles on my local filesystem (if possible).                 

--------------------------------------------------------------------------

Test Case:
----------
As an example, you can use psql to read the password file of your postgres server, without having any sort of login in
thesystem: 

(logged in locally as postgres super-user)

create table test (
    a    text,
    b    text,
    c    text,
    d    text,
    e    text,
    f    text,
    g    text
);

\f :

copy test from '/etc/passwd';

select * from test;

--------------------------------------------------------------------------

Solution:
---------


--------------------------------------------------------------------------