Re: [GENERAL] missing public on schema public
| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] missing public on schema public |
| Дата | |
| Msg-id | 16507.1510671423@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [GENERAL] missing public on schema public (Bo Thorbjørn Jensen <bo@budget123.dk>) |
| Ответы |
Re: [GENERAL] missing public on schema public
|
| Список | pgsql-general |
Bo Thorbjørn Jensen <bo@budget123.dk> writes:
> I have some additional info and a fix.
> Firstly steps to reproduce:
Yeah, I can reproduce this. I suspect it got broken by Stephen's hacking
around with default ACLs. A simple example is
$ pg_dump -c -U postgres postgres | grep -i public
DROP SCHEMA public;
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO postgres;
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
COMMENT ON SCHEMA public IS 'standard public schema';
-- Name: public; Type: ACL; Schema: -; Owner: postgres
GRANT ALL ON SCHEMA public TO PUBLIC;
That's fine, but if I shove it through an archive file:
$ pg_dump -f p.dump -Fc -U postgres postgres
$ pg_restore -c p.dump | grep -i public
DROP SCHEMA public;
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO postgres;
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
COMMENT ON SCHEMA public IS 'standard public schema';
This is *REALLY BAD*. Quite aside from the restore being wrong,
those two sequences should never ever give different results.
Stephen, you put some filtering logic in the wrong place in pg_dump.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: