Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVPb6-0001cY-RT for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2016 20:50:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bVPb6-0005yj-DV for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2016 20:50:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVPb5-0005yc-NU for pgsql-hackers@postgresql.org; Thu, 04 Aug 2016 20:50:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVPb3-0002Hp-Ge for pgsql-hackers@postgresql.org; Thu, 04 Aug 2016 20:50:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u74KoSAJ010166; Thu, 4 Aug 2016 16:50:28 -0400 From: Tom Lane To: Robert Haas cc: "David G. Johnston" , "pgsql-hackers@postgresql.org" Subject: Re: Fwd: [BUGS] BUG #14247: COMMENT is restored on wrong database In-reply-to: References: <20160713132122.1410.44923@wrigleys.postgresql.org> <21341.1470171516@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 04 Aug 2016 16:32:57 -0400" Date: Thu, 04 Aug 2016 16:50:28 -0400 Message-ID: <10165.1470343828@sss.pgh.pa.us> X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Tue, Aug 2, 2016 at 5:42 PM, David G. Johnston > wrote: > The fact that pg_dump is emitting COMMENT ON DATABASE at all is > fundamentally wrong given the existing division-of-labor decisions, > namely that pg_dump is responsible for objects within a database > not for database-level properties. > I think a while back somebody had the idea of making COMMENT ON > CURRENT_DATABASE or COMMENT ON CURRENT DATABASE work, which seems like > an elegant solution to me. Of course, I just work here. I'm fairly annoyed at David for having selectively quoted from private email in a public forum, but that was one of the points I touched on in material that he cut. The point I tried to make to him is that possibly COMMENT ON CURRENT DATABASE is a portion of a holistic solution, but it's only a portion. We need to rethink exactly what pg_dump is supposed to do with database-level properties. And if it does need COMMENT ON CURRENT DATABASE, it likely also needs GRANT ... ON CURRENT DATABASE, ALTER CURRENT DATABASE OWNER TO, ALTER CURRENT DATABASE SET, and maybe some other things. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers