Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-08-22 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: ALTER DATABASE ... SET seems to be something that doesn't fit in anywhere; I am thinking pg_dump -g should dump it. The upthread conclusion was that pg_dump -C should do it. I am not sure how you come to the conclusion that -g is an

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-08-21 Thread Bruce Momjian
We never came up with any idea of how pg_dump could dump ALTER DATABASE ... SET commands, so I have added a mention in the documentation, and backpatched to 8.3.X; attached. --- Richard Huxton wrote: Robert Treat wrote:

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-08-21 Thread Robert Treat
On Thursday 21 August 2008 18:28:55 Bruce Momjian wrote: We never came up with any idea of how pg_dump could dump ALTER DATABASE ... SET commands, so I have added a mention in the documentation, and backpatched to 8.3.X; attached. ok, I have no recollection of this conversation :-) but...

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-08-21 Thread Bruce Momjian
Robert Treat wrote: On Thursday 21 August 2008 18:28:55 Bruce Momjian wrote: We never came up with any idea of how pg_dump could dump ALTER DATABASE ... SET commands, so I have added a mention in the documentation, and backpatched to 8.3.X; attached. ok, I have no recollection of this

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-08-21 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: ALTER DATABASE ... SET seems to be something that doesn't fit in anywhere; I am thinking pg_dump -g should dump it. The upthread conclusion was that pg_dump -C should do it. I am not sure how you come to the conclusion that -g is an appropriate place,

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-07-01 Thread Richard Huxton
Tom Lane wrote: Richard Huxton [EMAIL PROTECTED] writes: Tom Lane wrote: So put forward a worked-out proposal for some other behavior. IMHO the time a dump/restore should be issuing ALTER...SET on a database is when it has issued the corresponding CREATE DATABASE. So pg_dump would produce

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-07-01 Thread Robert Treat
On Tuesday 01 July 2008 03:45:44 Richard Huxton wrote: Tom Lane wrote: Richard Huxton [EMAIL PROTECTED] writes: Tom Lane wrote: So put forward a worked-out proposal for some other behavior. IMHO the time a dump/restore should be issuing ALTER...SET on a database is when it has issued

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-07-01 Thread Richard Huxton
Robert Treat wrote: On Tuesday 01 July 2008 03:45:44 Richard Huxton wrote: The only time we need to restore per-database settings is if the database has been dropped. If you're not having the dump/restore re-create the database then presumably you've taken charge of the per-database settings.

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-30 Thread Richard Huxton
Tom Lane wrote: So put forward a worked-out proposal for some other behavior. OK My first thought is that the -c and -C options create a lot of the issues in this area. -c in particular is evidently meant for merging a dump into a database that already contains unrelated objects. (In fact

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-30 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: Tom Lane wrote: So put forward a worked-out proposal for some other behavior. IMHO the time a dump/restore should be issuing ALTER...SET on a database is when it has issued the corresponding CREATE DATABASE. So pg_dump would produce this info when,

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-29 Thread Robert Treat
On Friday 27 June 2008 12:58:41 Richard Huxton wrote: Richard Huxton wrote: Richard Huxton wrote: At present it means you can't reliably do: DROP DATABASE foo; pg_restore --create foo.dump I'd then have to either hand edit the dumpall dump or wade through a bunch of errors checking

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-29 Thread Alvaro Herrera
Robert Treat wrote: On Friday 27 June 2008 12:58:41 Richard Huxton wrote: Am I doing something stupid here? OK - so to get the ALTER DATABASE commands I need to dump the schema for the entire cluster. Is that really desired behaviour? Certainly not desired by a number of people I

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-29 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Robert Treat wrote: Certainly not desired by a number of people I have talked to, but I don't have much hope in seeing the behavoir change... perhaps someday if we get around to merging pg_dump and pg_dumpall I have never heard anyone say the

Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-27 Thread Richard Huxton
Richard Huxton wrote: At present it means you can't reliably do: DROP DATABASE foo; pg_restore --create foo.dump I'd then have to either hand edit the dumpall dump or wade through a bunch of errors checking that none of them were relevant. Actually, I'm not sure pg_dumpall does them either.

Re: Does anything dump per-database config settings? (was Re: [HACKERS] ALTER DATABASE vs pg_dump)

2008-06-27 Thread Richard Huxton
Richard Huxton wrote: Richard Huxton wrote: At present it means you can't reliably do: DROP DATABASE foo; pg_restore --create foo.dump I'd then have to either hand edit the dumpall dump or wade through a bunch of errors checking that none of them were relevant. Actually, I'm not sure