With CVS HEAD, I'm getting the following error when I try to access a
system column from within trigger (which I'm doing just for debug
purposes):

create table foo (a int);

create or replace function foo_trig_fn() returns trigger as $$
begin
  raise notice 'In trigger: added %', new.ctid;
  return new;
end
$$ language plpgsql;

create trigger foo_trig after insert on foo
  for each row execute procedure foo_trig_fn();

insert into foo values(1);

ERROR:  attribute number -1 exceeds number of columns 1

As far as I've been able to work out, this started after this commit:
http://archives.postgresql.org/pgsql-committers/2009-11/msg00035.php
but that's an area of the code I know nothing about. It looks like a
change to the parsing code is causing it to use a FieldSelect node for
the system attribute, where it didn't used to.

 - Dean

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to