Re: unknown type - Mailing list pgsql-admin

From Tom Lane
Subject Re: unknown type
Date
Msg-id 10133.1304517491@sss.pgh.pa.us
Whole thread Raw
In response to unknown type  (Viktor Bojović <viktor.bojovic@gmail.com>)
Responses Re: unknown type  (Viktor Bojović <viktor.bojovic@gmail.com>)
List pgsql-admin
=?UTF-8?Q?Viktor_Bojovi=C4=87?= <viktor.bojovic@gmail.com> writes:
> while restoring backup i have received these messages
> WARNING:  column "id" has type "unknown"
> DETAIL:  Proceeding with relation creation anyway.

It's most likely a view with an output column that's an undecorated
string literal.

> I have tried to grep schema-only dump file, but i didn't find word unknown.
> When i have extracted all mentioned ID fields i didn't find any field which
> is not of type integer,smallint or varchar.

> How can i find out which table has that unknown type?

Try something like

select attrelid::regclass, attname from pg_attribute where atttypid = 'unknown'::regtype;

            regards, tom lane

pgsql-admin by date:

Previous
From: Viktor Bojović
Date:
Subject: unknown type
Next
From: Viktor Bojović
Date:
Subject: Re: unknown type