Re: Custom types and pg_dump - Mailing list pgsql-general

From Tom Lane
Subject Re: Custom types and pg_dump
Date
Msg-id 2845.1240326965@sss.pgh.pa.us
Whole thread Raw
In response to Custom types and pg_dump  ("Roderick A. Anderson" <raanders@cyber-office.net>)
Responses Re: Custom types and pg_dump
List pgsql-general
"Roderick A. Anderson" <raanders@cyber-office.net> writes:
> While and after doing a import ("\i file_dump") I notice one table had
> two attributes with a type of "unknown".

Is it a table, or a view?  This is hardly unheard-of for views,
consider

regression=# create view v1 as select 'unmarked string' as c1;
WARNING:  column "c1" has type "unknown"
DETAIL:  Proceeding with relation creation anyway.
CREATE VIEW
regression=# \d v1
       View "public.v1"
 Column |  Type   | Modifiers
--------+---------+-----------
 c1     | unknown |
View definition:
 SELECT 'unmarked string' AS c1;

It's possible but much less common to have such things in plain tables.

> So the question is; is it possible to have a custom type in a cluster
> that is accessible/usable in a database but isn't picked up by pg_dump?

This has got nothing to do with missing types.

            regards, tom lane

pgsql-general by date:

Previous
From: "Roderick A. Anderson"
Date:
Subject: Custom types and pg_dump
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: Custom types and pg_dump