Re: BUG #14439: Trigger function fails with internal error after upgrade to 9.6

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: max(dot)valjanski(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14439: Trigger function fails with internal error after upgrade to 9.6
Date: 2016-11-29 14:53:49
Message-ID: 6448.1480431229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

max(dot)valjanski(at)gmail(dot)com writes:
> # update ab_group set name='Domain Controllerz' where id=466;
> ERROR: table row type and query-specified row type do not match
> ПОДРОБНОСТИ: Query provides a value for a dropped column at ordinal
> position 6.
> КОНТЕКСТ: SQL statement "UPDATE ab_group SET name_gin =
> to_tsvector('simple', NEW.name) WHERE id = NEW.id AND NEW.name <>
> OLD.name"
> PL/pgSQL function update_group_name_gin() line 4 at SQL statement

Wait a minute ... the trigger is issuing another UPDATE on its
own table? Aren't you risking an infinite recursion?

Could we see the result of

select attname,atttypid,attnum,attisdropped from pg_attribute
where attrelid = 'ab_group'::regclass order by attnum;

Also the exact definitions of all triggers and rules for that table.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-11-29 15:26:24 Re: BUG #14439: Trigger function fails with internal error after upgrade to 9.6
Previous Message Michael Day 2016-11-29 14:39:28 parallel sequential scan returns extraneous rows