Re: [HACKERS] issues with dropped columns in plpgsql code again

2013-05-10 Thread Pavel Stehule
Dne 10.5.2013 22:17 "Tom Lane" napsal(a): > > Pavel Stehule writes: > > One user reported a issues with triggers related to dropped columns. > > When I checked his code, I found a more possible problems. > > This is just the same kind of modified-rowtype problem we've discussed > before. Yes. It

Re: [HACKERS] issues with dropped columns in plpgsql code again

2013-05-10 Thread Tom Lane
Pavel Stehule writes: > One user reported a issues with triggers related to dropped columns. > When I checked his code, I found a more possible problems. This is just the same kind of modified-rowtype problem we've discussed before. I continue to maintain that the only realistic fix is to stop u

Re: [HACKERS] issues with dropped columns in plpgsql code again

2013-05-07 Thread Szymon Guz
On 7 May 2013 21:23, Pavel Stehule wrote: > sorry > > my test > > create table f1(a int, b int, c varchar, dropped_column numeric, d > varchar); > > create or replace function f1_trg() > returns trigger as $$ > declare _f1_var f1; > begin raise notice 'run trigger'; > _f1_var := new; > return

Re: [HACKERS] issues with dropped columns in plpgsql code again

2013-05-07 Thread Pavel Stehule
sorry my test create table f1(a int, b int, c varchar, dropped_column numeric, d varchar); create or replace function f1_trg() returns trigger as $$ declare _f1_var f1; begin raise notice 'run trigger'; _f1_var := new; return _f1_var; end; $$ language plpgsql; create trigger xx before inser

[HACKERS] issues with dropped columns in plpgsql code again

2013-05-07 Thread Pavel Stehule
Hello One user reported a issues with triggers related to dropped columns. When I checked his code, I found a more possible problems. He use a trigger in form $$ DECLARE somevar targettable; BEGIN somevar := NEW; // do some with somevar; RETURN somevar; END; $$ When I dropped column (I d