Re: pgsql: Fix pg_dump to dump shell types. - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Fix pg_dump to dump shell types.
Date
Msg-id 55C7CF3B.30703@dunslane.net
Whole thread Raw
In response to pgsql: Fix pg_dump to dump shell types.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers

On 08/04/2015 07:34 PM, Tom Lane wrote:
> Fix pg_dump to dump shell types.
>
> Per discussion, it really ought to do this.  The original choice to
> exclude shell types was probably made in the dark ages before we made
> it harder to accidentally create shell types; but that was in 7.3.
>
> Also, cause the standard regression tests to leave a shell type behind,
> for convenience in testing the case in pg_dump and pg_upgrade.
>
> Back-patch to all supported branches.
>
>


Still not quite there. If either 9.0 or 9.1 is upgraded to 9.2 or later,
they fail like this:

    pg_restore: creating TYPE "public"."myshell"
    pg_restore: setting owner and privileges for TYPE "public"."myshell"
    pg_restore: setting owner and privileges for ACL "public"."myshell"
    pg_restore: [archiver (db)] Error from TOC entry 4293; 0 0 ACL
    myshell buildfarm
    pg_restore: [archiver (db)] could not execute query: ERROR:  type
    "myshell" is only a shell
         Command was: REVOKE ALL ON TYPE "myshell" FROM PUBLIC;
    REVOKE ALL ON TYPE "myshell" FROM "buildfarm";
    GRANT ALL ON TYPE "myshell" TO PUBL...


We could just declare that we don't support this for versions older than
9.2, in which case I would just remove the type from the test database
before testing cross-version upgrade. But if it's easily fixed then
let's do it.

cheers

andrew




pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: pgsql: Fix typo in LDAP example
Next
From: Tom Lane
Date:
Subject: pgsql: Remove gram.y's precedence declaration for OVERLAPS.