Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHpMT-0000IT-Ek for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Jul 2015 08:26:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHpMS-0005Fx-Vs for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Jul 2015 08:26:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHpLq-0003yv-CC for pgsql-bugs@postgresql.org; Wed, 22 Jul 2015 08:26:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHpLm-0007yS-VI for pgsql-bugs@postgresql.org; Wed, 22 Jul 2015 08:26:05 +0000 MIME-Version: 1.0 Subject: BUG #13513: Turning a table into a view To: pgsql-bugs@postgresql.org From: p.buongiovanni@net-international.com Date: Wed, 22 Jul 2015 08:25:38 +0000 Message-ID: <20150722082538.9705.21746@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" 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 The following bug has been logged on the website: Bug reference: 13513 Logged by: Piergiorgio Buongiovanni Email address: p.buongiovanni@net-international.com PostgreSQL version: 9.2.13 Operating system: Centos 6.4 (Final) Description: I create the table MyTable with a foreign key. In a second time I drop that foreign key (using ALTER TABLE command) in order to turn the table MyTable into a view, using the command: CREATE RULE "_RETURN" AS ON SELECT TO MyTable DO INSTEAD... The server doesn't allow me to esecute this command as it tells me that there is a foreign key or a trigger on the table MyTable. The problem does not occur if I create the table MyTable without foreign keys at the beginnning. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs