Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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.