Re: [HACKERS] unfriendly error when accessing NEW in statement-level trigger

2012-01-28 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > When you try to use the NEW variable in a statement-level trigger, you get > ERROR: record "new" is not assigned yet > DETAIL: The tuple structure of a not-yet-assigned record is indeterminate. > I'm not that familiar with PL/pgSQL code, so I'm not sur

[HACKERS] unfriendly error when accessing NEW in statement-level trigger

2012-01-28 Thread Jan UrbaƄski
When you try to use the NEW variable in a statement-level trigger, you get ERROR: record "new" is not assigned yet DETAIL: The tuple structure of a not-yet-assigned record is indeterminate. which is not too friendly, given that people sometimes forget to specify FOR EACH at all, get the defaul