| From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | CVS HEAD: Error accessing system column from plpgsql trigger function |
| Date: | 2009-12-04 18:42:00 |
| Message-ID: | 8e2dbb700912041042v4980290etf1668277107c2e60@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David E. Wheeler | 2009-12-04 18:42:24 | Re: First feature patch for plperl - draft [PATCH] |
| Previous Message | Tom Lane | 2009-12-04 18:36:52 | Re: First feature patch for plperl - draft [PATCH] |