Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to back up a table from a database schema.The table is located under kdb28_test_h and a schema named kref. I tried with the following code

pg_dump --host=110.11.12.16 --port=5432 --username=db_root --password --column-inserts \n 
    --table=kref.abc kdb28_test_h > test_h_popl_back_up.sql 

but insert command is generating like

insert into abc(----);

but I need

insert into kref.abc(------)
share|improve this question

migrated from stackoverflow.com Nov 22 '12 at 9:33

This question came from our site for professional and enthusiast programmers.

That's fine because your dump should have the following:

SET search_path = kref, pg_catalog;

and then table definition followed by insert statements

share|improve this answer
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.