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= --port=5432 --username=db_root --password --column-inserts \n kdb28_test_h > test_h_popl_back_up.sql 

but insert command is generating like

insert into abc(----);

but I need

insert into
share|improve this question

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


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