Re: Fix pg_upgrade to preserve datdba

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fix pg_upgrade to preserve datdba
Дата
Msg-id 388710.1616351698@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fix pg_upgrade to preserve datdba  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fix pg_upgrade to preserve datdba  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Fix pg_upgrade to preserve datdba  (Jan Wieck <jan@wi3ck.info>)
Список pgsql-hackers
I wrote:
> Needs a little more work than that --- we should allow it to respond
> to the --no-owner switch, for example.  But I think likely we can do
> it where other object ownership is handled.  I'll look in a bit.

Actually ... said code already DOES do that, so now I'm confused.
I tried

regression=# create user joe;
CREATE ROLE
regression=# create database joe owner joe;
CREATE DATABASE
regression=# \q
$ pg_dump -Fc joe >joe.dump
$ pg_restore --create -f - joe.dump | more

and I see

--
-- Name: joe; Type: DATABASE; Schema: -; Owner: joe
--

CREATE DATABASE joe WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII' LOCALE = 'C';


ALTER DATABASE joe OWNER TO joe;

so at least in this case it's doing the right thing.  We need a bit
more detail about the context in which it's doing the wrong thing
for you.

            regards, tom lane



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Built-in connection pooler
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: default result formats setting