Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U1HYg-0006yT-5U for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Feb 2013 14:25:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U1HYe-0007mb-PE for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Feb 2013 14:25:36 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U1EmA-0003en-TF for pgsql-bugs@postgresql.org; Fri, 01 Feb 2013 11:27:22 +0000 Received: from mail-out4-4.superhost.pl ([194.169.227.43]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U1Em9-0006lr-18 for pgsql-bugs@postgresql.org; Fri, 01 Feb 2013 11:27:22 +0000 Received: from [10.5.10.38] (static-78-9-101-210.ssp.dialog.net.pl [78.9.101.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lopuszanski@oleofarm.com) by afrodyta4.superhost.pl (Postfix) with ESMTPSA id D5FF59AC83A2; Fri, 1 Feb 2013 12:27:18 +0100 (CET) Message-ID: <510BA695.3060408@oleofarm.com> Date: Fri, 01 Feb 2013 12:27:17 +0100 From: =?UTF-8?B?TWFjaWVqIMWBb3B1c3phxYRza2k=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7842: pg_dump scripts view to table References: <18122.1359660455@sss.pgh.pa.us> In-Reply-To: <18122.1359660455@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org is there a way to find exactly what object/table/column creates this circular dependency? pg_dumb even in verbose mode does not warn/error of this situation. I managed to find this by testing copy of production db(this should be reported by pg_dump). also there is nothing fancy about this 'view' of mine. in db it looks like this: t1, t2, t3.......t10 create view1 from t1-t10 create view2 from view1 (only agregation with group by). pg_dump creates table from view1. best regards, maciej lopuszanski W dniu 31.01.2013 20:27, Tom Lane pisze: > lopuszanski@oleofarm.com writes: >> 1. after using pg_dump to dump WHOLE database to file, 1 of views 'turned' >> into a table. >> so there is no 'create or replace VIEW XXXX .......' with definition, but >> instead: >> its scripted as 'create TABLE XXXX......' and definition.(in file that >> pg_dump created) > There's probably a CREATE RULE command further down that turns it into a > view again. > >> 2. but after using pg_dump to dump only this 1 problematic 'view' (with -t >> option) it stores it correcly as 'create or replace VIEW XXXX .......' > That's not terribly surprising. The separate table and rule entries > would only be used when it's necessary to work around a circular > dependency with some other object. > >> it looks like pg_dump has problem with dependancies of this view..... > I see no reason to think there's a bug here. If you still think it's > a bug, you need to provide enough information for someone else to > reproduce the case. > http://www.postgresql.org/docs/9.1/static/bug-reporting.html > > regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs