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

Re: the copy command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: johnf <jfabiani(at)yolo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: the copy command
Date: 2007-09-11 00:31:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
johnf <jfabiani(at)yolo(dot)com> writes:
> When I use a copy command from the pgadmin query screen  as in:
> COPY agschgrid (tablename, header1, header2, header3, header4, header5,
> coldata1, coldata3, coldata2, coldata4, coldata5, retfield, pkid, prikey,
> colcount, lookupfld, regid, lk_filter, "txtBoxID", field1, field2, field3,
> field4, field5) FROM '/home/johnf/agschgrid_data.sql'

> I always get "file not found".

This form of COPY runs on the server, using the server's file access
permissions.  Are you on the same machine that the Postgres server is
on?  Do you have /home/johnf's permissions set so that the Postgres
userid can read it?

> I don't understand why pgadmin3 can't see my file?

pgadmin3 is not involved in executing this command.

There is probably some feature in pgadmin3 by which *it* can open the
file and feed the data across the net to the server, but this command
is not that.

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Keith WorthingtonDate: 2007-09-11 03:54:06
Subject: Returning multiple values from a function
Previous:From: psql-noviceDate: 2007-09-10 23:19:36
Subject: Re: Column Ordering

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