X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A84B13A4B3A for ; Fri, 7 Jan 2005 11:07:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30531-03 for ; Fri, 7 Jan 2005 11:07:15 +0000 (GMT) Received: from athos.gymnacel.cz (67.178.212.194.contactel.net [194.212.178.67]) by svr1.postgresql.org (Postfix) with ESMTP id D8BA43A4E14 for ; Fri, 7 Jan 2005 11:06:53 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by athos.gymnacel.cz (Postfix) with ESMTP id 2C29E4C0FD9F for ; Fri, 7 Jan 2005 12:06:52 +0100 (CET) Received: from athos.gymnacel.cz ([127.0.0.1]) by localhost (athos.gymnacel.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16797-04 for ; Fri, 7 Jan 2005 12:06:51 +0100 (CET) Received: from [192.168.11.207] (unknown [192.168.11.207]) by athos.gymnacel.cz (Postfix) with ESMTP id B7DA84C10B12 for ; Fri, 7 Jan 2005 12:06:51 +0100 (CET) Message-ID: <41DE6E1D.9060203@gymnacel.cz> Date: Fri, 07 Jan 2005 12:10:21 +0100 From: =?ISO-8859-2?Q?Filip_Jirs=E1k?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7) Gecko/20040616 X-Accept-Language: cs, en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: View with Union and update rule - fails Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.257 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200501/23 X-Sequence-Number: 19811 Hi, I have trouble with following VIEW and RULE: ---------------- CREATE SCHEMA test AUTHORIZATION postgres; CREATE TABLE test.table1 ( uid int4, col1 int4, col2 int4, col3 int4 ); CREATE TABLE test.table2 ( col4 int4 ) INHERITS (test.table1); CREATE TABLE test.table3 ( col5 int4 ) INHERITS (test.table1); CREATE VIEW test.view1 AS SELECT uid, col1,col2,col3 FROM test.table2 UNION SELECT uid, col1,col2,col3 FROM test.table3; INSERT INTO test.table1 VALUES (1,1,1,1); INSERT INTO test.table1 VALUES (2,2,2,2); INSERT INTO test.table1 VALUES (3,3,3,3); INSERT INTO test.table1 VALUES (4,4,4,4); INSERT INTO test.table2 VALUES (5,5,5,5,5); INSERT INTO test.table2 VALUES (6,6,6,6,6); INSERT INTO test.table2 VALUES (7,7,7,7,7); INSERT INTO test.table2 VALUES (8,8,8,8,8); INSERT INTO test.table3 VALUES (9,9,9,9,9); INSERT INTO test.table3 VALUES (10,10,10,10,10); INSERT INTO test.table3 VALUES (11,11,11,11,11); INSERT INTO test.table3 VALUES (12,12,12,12,12); CREATE OR REPLACE RULE r1 AS ON UPDATE TO test.view1 DO INSTEAD UPDATE test.table1 SET col1 = 100; UPDATE test.view1 SET col2 = 101 WHERE uid=1; ---------------- I get: ERROR: unrecognized node type: 651 But UPDATE test.view1 SET col2 = 101; (without WHERE) works fine. View without UNION works also fine. Is there something wrong in my code, or is it some feature/bug? PostgreSQL is 7.4.5 running on Gentoo Linux. Thanks, Filip Jirsák