X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 898469DC997 for ; Wed, 25 Jan 2006 12:53:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19531-06 for ; Wed, 25 Jan 2006 12:53:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from l0isi08.larcb.ecs.nasa.gov (l0isi08u.ecs.nasa.gov [129.165.226.2]) by postgresql.org (Postfix) with ESMTP id D36189DC837 for ; Wed, 25 Jan 2006 12:53:54 -0400 (AST) Received: (from hermes@localhost) by l0isi08.larcb.ecs.nasa.gov (AIX5.1/8.11.6p2/8.11.0) id k0PGsdU589876; Wed, 25 Jan 2006 11:54:39 -0500 X-Authentication-Warning: l0isi08.larcb.ecs.nasa.gov: hermes set sender to using -f Received: by larcb.ecs.nasa.gov via smwrap Version 5.1.5 id smwrapB.ipya; Wed Jan 25 11:54:36 2006 Message-ID: <43D7AD1A.9060101@larcb.ecs.nasa.gov> Date: Wed, 25 Jan 2006 11:53:46 -0500 From: Yantao Shi User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: CC: Subject: Re: psql copy script References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200601/283 X-Sequence-Number: 20371 Don't you have to use a "\" in front of copy like : \copy? I use \copy command all the time, never have any problems with it. Yantao Shi Aniko.Badzong@swisscom.com wrote: > Hi Alvaro > > Thanks for the help but it does not work. > > when I execute it than I get: > [test/data] su - postgres -c "psql logdb -c 'copy test from > \'/data/log/bla\''" > Unmatched '. > > If I correct the error than I get the following: > > [test/data] su - postgres -c "psql logdb -c 'copy test from > \'/data/log/bla'\'" > psql: warning: extra command-line argument "copy test from > \/data/log/bla\" ignored > psql: FATAL: role "-c" does not exist > > Any idea why? > thx and regards > Aniko > >