Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id EEB63119C295 for ; Thu, 8 Mar 2012 15:40:41 -0400 (AST) Received: from mail.dhs-club.com ([208.69.229.2]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S5jCZ-00005U-TA for pgsql-bugs@postgresql.org; Thu, 08 Mar 2012 19:40:40 +0000 Received: from [192.168.0.11] (hq.clubshop.com [208.78.129.189]) (authenticated bits=0) by mail.dhs-club.com (8.14.4/8.14.4) with ESMTP id q28JeQVj029249 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 8 Mar 2012 19:40:26 GMT Message-ID: <4F590B2A.1030709@dhs-club.com> Date: Thu, 08 Mar 2012 14:40:26 -0500 From: Bill MacArthur User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: table row type and query-specified row type do not match Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.70 on 208.69.229.2 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/68 X-Sequence-Number: 32629 Hello, Perhaps this issue has been resolved in higher sub-versions or in 9.1? In summary, the issue revolves around the data type of a column being changed, but the data type in a dependent rule on another table does not. Does the data type have to be embedded in the rule? Sorry if the issue has already been discussed. Googling it didn't seem to turn up anything. Thank you for a great product anyway! Bill MacArthur Postgres version: PostgreSQL 9.0.5 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50), 64-bit OS version: CentOS release 5.7 (Final) network=# create table test.a (id bigint); CREATE TABLE network=# create table test.b (id integer); CREATE TABLE ^ network=# create rule testb_delete AS on delete to test.b DO INSERT INTO test.a (id) VALUES (old.id); CREATE RULE network=# insert into test.b (id) values (123); INSERT 0 1 network=# delete from test.b; DELETE 1 network=# select * from test.a; id ----- 123 (1 row) network=# alter table test.a alter column id type integer; ALTER TABLE network=# insert into test.b (id) values (12399); INSERT 0 1 network=# delete from test.b; ERROR: table row type and query-specified row type do not match DETAIL: Table has type integer at ordinal position 1, but query expects bigint.