On Thu, Jun 23, 2016 at 11:00 PM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Well, it's not specifically related to domains -- it's related to the > fact that pg_catalog objects mask the domain you created in the public > schema, because pg_catalog is by default in front of all other schemas > unless you explicitely put it elsewhere.
Well, what's causing the apparent weirdness here is the fact that pg_catalog, despite being implicitly at the front of the namespath path, doesn't become the default creation schema as an explicitly-named schema would. So you don't try to create things there but anything that already exists there masks the stuff you do create. And I think it's fair to say that's pretty weird to someone who is unfamiliar with the way the system works. We could do something like this: NOTICE: existing type "pg_catalog"."text" will mask new type "public"."text" We could even make that an ERROR by default, as long as we had some GUC to disable the behavior for pg_dump. How often do you really intentionally create an object that shadows an existing system object? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers