pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Fwd: [BUGS] BUG #14247: COMMENT is restored on wrong database
Date: Thu, 04 Aug 2016 16:50:28 -0400
Message-ID: <10165.1470343828@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYNRV-NZvDSMk_Vra1=fZEVpWf8cGWP-bFC-0_qVRftag@mail.gmail.com>
References: <20160713132122.1410.44923@wrigleys.postgresql.org>
	<CAKFQuwZxWHr6OgMk39DD1Q-V1NgEgkg_dDtz=UthNcS-7A3XOw@mail.gmail.com>
	<CAKFQuwYY+fNBC9PfJhBqjGMjDwkfQjENv7_oYYc_gaAdNuEPFg@mail.gmail.com>
	<21341.1470171516@sss.pgh.pa.us>
	<CAKFQuwZQpk-JW3kjnJx06fXHiGobRzeu=r3sTW1yJ+LhfhCPdg@mail.gmail.com>
	<CA+TgmoYNRV-NZvDSMk_Vra1=fZEVpWf8cGWP-bFC-0_qVRftag@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Aug 2, 2016 at 5:42 PM, David G. Johnston
> <david.g.johnston@gmail.com> 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



view thread (7+ messages)  latest in thread

Message-ID: <10165.1470343828@sss.pgh.pa.us>
Permalink:  ../10165.1470343828@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10165.1470343828@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, david.g.johnston@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: Fwd: [BUGS] BUG #14247: COMMENT is restored on wrong database
  In-Reply-To: <10165.1470343828@sss.pgh.pa.us>
  References: <20160713132122.1410.44923@wrigleys.postgresql.org> <CAKFQuwZxWHr6OgMk39DD1Q-V1NgEgkg_dDtz=UthNcS-7A3XOw@mail.gmail.com> <CAKFQuwYY+fNBC9PfJhBqjGMjDwkfQjENv7_oYYc_gaAdNuEPFg@mail.gmail.com> <21341.1470171516@sss.pgh.pa.us> <CAKFQuwZQpk-JW3kjnJx06fXHiGobRzeu=r3sTW1yJ+LhfhCPdg@mail.gmail.com> <CA+TgmoYNRV-NZvDSMk_Vra1=fZEVpWf8cGWP-bFC-0_qVRftag@mail.gmail.com> <10165.1470343828@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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