pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psql copy script
2+ messages / 2 participants
[nested] [flat]

* psql copy script
@ 2006-01-25 16:32 Aniko.Badzong@swisscom.com
  2006-01-25 16:53 ` Re: psql copy script Yantao Shi <y.shi@larc.nasa.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: Aniko.Badzong@swisscom.com @ 2006-01-25 16:32 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: psql copy script
  2006-01-25 16:32 psql copy script Aniko.Badzong@swisscom.com
@ 2006-01-25 16:53 ` Yantao Shi <y.shi@larc.nasa.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: Yantao Shi @ 2006-01-25 16:53 UTC (permalink / raw)
  To: Aniko.Badzong@swisscom.com; +Cc: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-01-25 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 16:32 psql copy script Aniko.Badzong@swisscom.com
2006-01-25 16:53 ` Yantao Shi <y.shi@larc.nasa.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox