Re: Can pg_dump make use of CURRENT/SESSION_USER - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Can pg_dump make use of CURRENT/SESSION_USER
Date
Msg-id 20150317172459.GM3636@alvh.no-ip.org
Whole thread Raw
In response to Can pg_dump make use of CURRENT/SESSION_USER  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Can pg_dump make use of CURRENT/SESSION_USER  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> Are there any use-cases for pg_dump to use CURRENT/SESSION_USER in its
> output, so that restores will not be hard-coded to the dump user?  I
> didn't see any cases of that, but wanted to ask.

Good question.  I don't know, probably not.

If we ever implement something like

COMMENT ON CURRENT_DATABASE IS ...

it will be useful, because you will be able to restore a dump into
another database and have the comment apply to the target database.
(Also, I wonder about
ALTER USER foo IN DATABASE current_database ...
because that will let us dump per-database user options too.)


-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Strange assertion using VACOPT_FREEZE in vacuum.c
Next
From: Stephen Frost
Date:
Subject: Re: Rethinking the parameter access hooks for plpgsql's benefit