On Sat, Jun 30, 2012 at 11:12:56AM -0400, Tom Lane wrote:
> Bruce Momjian <br...@momjian.us> writes:
> > On Fri, Jun 29, 2012 at 11:35:15PM -0400, Tom Lane wrote:
> >> I think you're misjudging the core of the issue.  The same thing
> >> would happen if somebody dropped and recreated the public schema.
> >> Or anything else that we create at initdb time but allow to be
> >> dropped.
> 
> > I just tested dropping and recreating the 'public' schema and pg_upgrade
> > worked fine.
> 
> Did it restore the nonstandard ownership of the schema?  Your proposed
> fix for plpgsql won't preserve the previous state of the extension.
> (Maybe we don't care, but it needs consideration.)

My point was that drop/create of the public schema does not generate a
pg_upgrade error like plpgsql does.

Let me address the schema question here and the plpgsql issue in the
next email.

> Did it restore the nonstandard ownership of the schema?

No --- drop/create of the public schema produces:

        test=> \dn+
                           List of schemas
          Name  |  Owner   | Access privileges | Description
        --------+----------+-------------------+-------------
         public | postgres |                   |
        (1 row)

while the original shipped public and the post-upgrade of a drop/created
schema are:

        test=> \dn+
                                  List of schemas
          Name  |  Owner   |  Access privileges   |      Description
        --------+----------+----------------------+------------------------
         public | postgres | postgres=UC/postgres+| standard public schema
                |          | =UC/postgres         |
        (1 row)

However, surprisingly, a simple pg_dump/restore also does not preserve
the public schema permissions either.  :-(

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to