Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9462064FD1B for ; Thu, 18 Sep 2008 18:10:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28150-07 for ; Thu, 18 Sep 2008 18:09:06 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by postgresql.org (Postfix) with ESMTP id 8812164FCD2 for ; Thu, 18 Sep 2008 18:04:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx3.hub.org (Postfix) with ESMTP id D591B37B837 for ; Thu, 18 Sep 2008 18:04:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m8IL1XCT002236; Thu, 18 Sep 2008 17:01:33 -0400 (EDT) To: Carol Walter cc: pgsql-admin@postgresql.org Subject: Re: type unknown? In-reply-to: References: Comments: In-reply-to Carol Walter message dated "Thu, 18 Sep 2008 16:29:03 -0400" Date: Thu, 18 Sep 2008 17:01:33 -0400 Message-ID: <2235.1221771693@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/206 X-Sequence-Number: 30299 Carol Walter writes: > Postgres. To do this, I did a pg_dumpall and I'm restoring. I got > an error on the restoration as follows: > psql:/dbsdisk/data_load/dbdev_all_080915.sql:3920581: WARNING: > column "collection" has type "unknown" > DETAIL: Proceeding with relation creation anyway. AFAIK the only way to get that warning is with an undecorated literal constant: regression=# create view foo as select 'bar' as collection; WARNING: column "collection" has type "unknown" DETAIL: Proceeding with relation creation anyway. CREATE VIEW regression=# \d foo View "public.foo" Column | Type | Modifiers ------------+---------+----------- collection | unknown | View definition: SELECT 'bar' AS collection; ... which is not what you're showing here: > The view that was being processes when the error occurred is: > View "public.v_cos_master_year_count" > Column | Type | Modifiers > -------------+-------------------+----------- > collection | text | > year | character varying | > entry_count | bigint | > View definition: > SELECT 'cos'::text AS collection, cos_master.year_published AS > "year", count(cos_master.id) AS entry_count > FROM cos_master > GROUP BY cos_master.year_published, cos_master.collection > ORDER BY cos_master.year_published; Are you sure you correctly identified which view is drawing the warning? regards, tom lane