Question

I try to copy postgresql table in another database as I write in pgAdmin 3 this query

$pg_dump -t pl_biz_enhanced business_catalog | psql business_catalog_enhanced

here pl_biz_enhanced is the table i want to copy and business_catalog is the database in which is this table

But I receive syntax error near $.

Was it helpful?

Solution

That's not an SQL query.

$pg_dump -t pl_biz_enhanced business_catalog | psql business_catalog_enhanced

The $ is a reference to the UNIX shell prompt, which usually ends in $.

This is a shell command. You can't run it in PgAdmin-III.

As far as I know there's no equivalent feature in PgAdmin-III. Either do the pg_dump | pg_restore in the command prompt or manually do the equivalent in PgAdmin-III, which would be to dump just the pl_biz_enhanced table of business_catalog and then restore it to the separate database business_catalog_enhanced.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top