Home > Archive > PostgreSQL Administration > January 2006 > psql copy script









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author psql copy script
Aniko.Badzong@swisscom.com

2006-01-26, 4:59 pm

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



Yantao Shi

2006-01-26, 4:59 pm

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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com