BUG #4364: type of "new.id" does not match that when preparing the plan - Mailing list pgsql-bugs

From Alexander Kirpa
Subject BUG #4364: type of "new.id" does not match that when preparing the plan
Date
Msg-id 200808191814.m7JIEPS7092748@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4364
Logged by:          Alexander Kirpa
Email address:      postgres@bilteks.com
PostgreSQL version: 8.3.1
Operating system:   FreeBSD 7.0
Description:        type of "new.id" does not match that when preparing the
plan
Details:

After change column type from integer to smallint
trigger function generate next error
----------
2008-08-19 20:50:30 EEST 42945 ERROR:  type of "new.id" does not match that
when preparing the plan
2008-08-19 20:50:30 EEST 42945 CONTEXT:  PL/pgSQL function
"job_tf_after_update" line 3 at IF
2008-08-19 20:50:30 EEST 42945 STATEMENT:  UPDATE job SET
processid=43057,job_starttime=now() WHERE id=2
----------- error line in trigger
IF NOT EQ(NEW.id,OLD.id) THEN
 RAISE EXCEPTION 'UPDATE id NOT ALLOWED';
END IF;
-----------
Workaround: touch trigger function

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: BUG #4340: SECURITY: Is SSL Doing Anything?
Next
From: Tom Lane
Date:
Subject: Re: BUG #4340: SECURITY: Is SSL Doing Anything?