pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Pg_dump does not include database search path in backup file 2+ messages / 2 participants [nested] [flat]
* Pg_dump does not include database search path in backup file @ 2004-08-13 17:02 Richard Harris <Richard_Harris@adp.com> 0 siblings, 1 reply; 2+ messages in thread From: Richard Harris @ 2004-08-13 17:02 UTC (permalink / raw) To: pgsql-admin Hi, I'm using PostgreSQL 7.4.2. I have a database with several user defined schemas, e.g., public, shr, sys, acc, prt. I have altered the database search path to include all of the schema. ALTER DATABASE adp_test_db SET search_path to public, shr, sys, acc, prt, svc, fi; I used pg_dump to backup to database. pg_dump -U adp_dba -C -F p -f /adp/db/backup/at_db_p_text.bak adp_te st_db Then I used psql to restore the database from the backup file. However, psql restored the search path to the default (e.g., $user, public) rather than the search path with all the schemas. I found an item in the mailing lists regarding a 'bug in pg_dump Alter Database' on Tue 29 2004. However, it appears to me that this is about a bug found in testing the next release, not a bug in a current release. I do not see any 'alter database' statements setting the search path in the backup file from pg_dump. Should PostgreSQL 7.4.2 pg_dump include an 'Alter Database' for the search path? If so, what pg_dump option does this? Thank you for your help. Thanks, Rich Harris ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Pg_dump does not include database search path in backup file @ 2004-08-13 20:24 Tom Lane <tgl@sss.pgh.pa.us> parent: Richard Harris <Richard_Harris@adp.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2004-08-13 20:24 UTC (permalink / raw) To: Richard Harris <Richard_Harris@adp.com>; +Cc: pgsql-admin "Richard Harris" <Richard_Harris@adp.com> writes: > I'm using PostgreSQL 7.4.2. I have a database with several user defined > schemas, e.g., public, shr, sys, acc, prt. I have altered the database > search path to include all of the schema. > ALTER DATABASE adp_test_db SET search_path to public, shr, sys, acc, > prt, svc, fi; > Then I used psql to restore the database from the backup file. However, > psql restored the search path to the default (e.g., $user, public) > rather than the search path with all the schemas. pg_dump only dumps the contents of the database. Settings associated with ALTER DATABASE or ALTER USER are considered to be the province of pg_dumpall. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-08-13 20:24 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2004-08-13 17:02 Pg_dump does not include database search path in backup file Richard Harris <Richard_Harris@adp.com> 2004-08-13 20:24 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox