Re: Can pg_dump make use of CURRENT/SESSION_USER

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: Can pg_dump make use of CURRENT/SESSION_USER
Дата
Msg-id CAFcNs+rDHpQuZ2X0_hRDgEoXvn=m6sPMunJ_GW2oYCv81c4BBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Can pg_dump make use of CURRENT/SESSION_USER  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Can pg_dump make use of CURRENT/SESSION_USER  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Mar 18, 2015 at 2:24 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Wed, Mar 18, 2015 at 1:23 PM, Fabrízio de Royes Mello
> <fabriziomello@gmail.com> wrote:
> >> > 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.
> >
> > I think it's simple to implement, but how about pg_dump... we need to add
> > new option (like --use-current-database) or am I missing something ?
>
> I think we'd just change it to use the new syntax, full stop.  I see
> no need for an option.
>

I'm returning on this...

What's the reasonable syntaxes?

COMMENT ON CURRENT DATABASE IS 'text';

or

COMMENT ON DATABASE { CURRENT_DATABASE | object_name } IS 'text';


> >> > (Also, I wonder about
> >> > ALTER USER foo IN DATABASE current_database ...
> >> > because that will let us dump per-database user options too.)
> >>
> >> +1 for both of those ideas.
> >
>

ALTER ROLE { role_specification | ALL } [ IN CURRENT DATABASE ] SET/RESET ...

or

ALTER ROLE { role_specification | ALL } [ IN { CURRENT DATABASE | DATABASE database_name } ] SET/RESET ...


Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Feedback on getting rid of VACUUM FULL
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: forward vs backward slashes in msvc build code