smatiz@hotmail.com writes:
> RAISE NOTICE 'valores.iva (%)', valores.iva;
I see a UTF8 byte order mark (BOM) in front of "valores.iva" there,
which plpgsql is interpreting as part of the record name, so it doesn't
find any matching variable. I'd be the first to agree that the error
message isn't too helpful. But your text editor and your mailer didn't
do you any favors either, if they hid that BOM from you.
regards, tom lane