Tom Lane wrote:
There was some discussion today about restoring pg_dump output as a
non-superuser:
http://archives.postgresql.org/pgsql-admin/2008-01/msg00128.php

In 8.3 we have eliminated one of the major roadblocks to doing that,
which is that we now allow non-superuser database owners to create
trusted procedural languages for themselves.  There's still a minor
roadblock, which is that at the moment pg_dump emits a "COMMENT ON
SCHEMA public" by default, and that fails if you're not the owner
of schema public, ie, the bootstrap superuser.

In the past we've always written off this kind of thing as just
cosmetic, but with the increasing performance advantages of doing
a restore in a single transaction, I think it's important to try
to eliminate "ignorable errors" in dump/restore.  Especially ones
as silly as this.

Accordingly I propose the attached patch.  It's certainly ugly,
but it's not very much uglier than what was there already.
Anyone who had a custom comment on schema public would lose it,
but who does that?

Thoughts?

Could we dump it when it's non-default only? That way the people that *have* set a custom comment on it will still get it restored, just a failure in this case. The majority of people who *haven't* set a comment will not have the problem at all.

I don't really like dropping things in the dump if we can avoid it...

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to