Can you assign the value of a dynamic record value. For example sales_month1_x := RECORDNAME.quote_ident('month1_'||quote_literal(yr2));
You're right - it won't work. PLPGSQL has strict type-checking, so it's no good for this sort of stuff. Perhaps pl/tcl/perl/python would be better for you.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster