Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 366C12E002F for ; Fri, 11 Apr 2008 20:01:14 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 80180-09 for ; Fri, 11 Apr 2008 20:01:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id B82B92E005D for ; Fri, 11 Apr 2008 20:01: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 m3BN17eU018481; Fri, 11 Apr 2008 19:01:07 -0400 (EDT) To: Marc Cousin cc: pgsql-admin@postgresql.org Subject: Re: cannot restore a view after a dump In-reply-to: <200804041022.31746.mcousin@sigma.fr> References: <200804041022.31746.mcousin@sigma.fr> Comments: In-reply-to Marc Cousin message dated "Fri, 04 Apr 2008 10:22:31 +0200" Date: Fri, 11 Apr 2008 19:01:06 -0400 Message-ID: <18480.1207954866@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/101 X-Sequence-Number: 28865 Marc Cousin writes: > I'm having a strange problem : I created a view in a database, and I cannot restore it after a pg_dump. > ... > ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list You need this patch: http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/arrayfuncs.c?r1=1.140&r2=1.140.2.1 I found that this problem was introduced in 8.2, which may explain why you'd not seen it before, if you were previously using an older release. regards, tom lane