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

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

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: psql 'copy' command access server filesystem rather that the client
Date: 1999-06-13 22:23:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
                        POSTGRESQL BUG REPORT TEMPLATE

Your name               : Mark Stosberg
Your email address      : mark(at)summersault(dot)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      : 

FreeBSD 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 the postgres server host, rather than my local host. While either way could be considered 'correct', it seems more logical and convenient to me to access the client filesystem. One case for this is the scenerio in which the DBA is the only one 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 importing files 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 the system:

(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;




pgsql-bugs by date

Next:From: Unprivileged userDate: 1999-06-14 07:41:02
Subject: General Bug Report: can't create this view (rule plan string too big)
Previous:From: Michael RichardsDate: 1999-06-10 03:36:33
Subject: Re: [BUGS] General Bug Report: prefix stringsearch doesn't return results

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