Weird quirk with pg_dump of complex types - Mailing list pgsql-bugs

From Josh Berkus
Subject Weird quirk with pg_dump of complex types
Date
Msg-id 49A724E7.3070809@agliodbs.com
Whole thread Raw
Responses Re: Weird quirk with pg_dump of complex types  (Jeff Davis <pgsql@j-davis.com>)
Re: Weird quirk with pg_dump of complex types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
All,

This is not so much a bug as a weird inconsistency, which ought to go on
a list somewhere so that it gets cleaned up the next time someone
overhauls pg_dump:

Summary: CREATE TYPE uses explicit schemas
Versions Tested: 8.2.9, 8.3.5
Platform: Linux
Description of Issue:

When doing pg_dump in text mode, complext types will be dumped like this:

CREATE TYPE complex_foo (
    var    INT,
    gar    TEXT,
    natch    public.foo_type
);

That is, a custom type in a complex type declaration is explicitly
schema-qualified, even when the schema in question is in the default
schema_path.  This is inconsistent with all other database objects,
which use "SET search_path" to qualify the correct schemas.

This is only a real problem in that it may interfere with backup and/or
schema comparison automation (like I'm trying to write right now).

--Josh Berkus

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Database/Table Owner Question
Next
From: Jeff Davis
Date:
Subject: Re: Weird quirk with pg_dump of complex types