Обсуждение: Re: syntax error while using pg_dump in Postgres 8.4

Поиск
Список
Период
Сортировка

Re: syntax error while using pg_dump in Postgres 8.4

От
David G Johnston
Дата:
CrabbeS wrote
> I am trying to copy a table form one database to another by using this
> command in the SQL-query builder:
> pg_dump TA2000 -t from Forest -c -s | psql -h localhost postgis;

pg_dump is a standalone application (i.e., something you run in a
shell/command-line) and not an SQL command.

Pipes (the "|" in your string) are also shell/command-line only and cannot
be used where SQL is expected.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/syntax-error-while-using-pg-dump-in-Postgres-8-4-tp5825054p5825056.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: syntax error while using pg_dump in Postgres 8.4

От
David G Johnston
Дата:
The psql console still operates mainly at the SQL level of input.  You need to use your OS's shell to run pg_dump.

Both psql and pg_dump are the same kind of application and are run in a similar fashion.

David J.


On Thu, Oct 30, 2014 at 11:13 AM, CrabbeS [via PostgreSQL] <[hidden email]> wrote:
ok That helps...

I am now trying this in psql console- think this should work... (still getting some errors- but will try to figure it out)

Thank you very much !
Sarah


If you reply to this email, your message will be added to the discussion below:
http://postgresql.1045698.n5.nabble.com/syntax-error-while-using-pg-dump-in-Postgres-8-4-tp5825054p5825071.html
To unsubscribe from syntax error while using pg_dump in Postgres 8.4, click here.
NAML



View this message in context: Re: syntax error while using pg_dump in Postgres 8.4
Sent from the PostgreSQL - general mailing list archive at Nabble.com.