Ken Tanzer <ken.tanzer@xxxxxxxxx> writes: > Hi. I got an error message reported to me that I've never seen before, and > I'm not quite sure what it means or what would cause it. > ERROR: type of parameter 70 (text) does not match that when preparing the > plan (unknown) CONTEXT: PL/pgSQL function > generate_payments(date,text,integer,integer) line 195 at assignment I think this must mean that you changed the schema of table tbl_payment during this session, and then re-ran the function. plpgsql isn't as good as it could be about dealing with intra-session changes of composite types. The reference to "parameter 70" seems a bit odd though, it doesn't seem like you have anywhere near 70 variables in that function ... > (And BTW, how exactly is that line number counted? Does the "CREATE > FUNCTION" statement count as line 1? In recent versions, the opening quote of the function's body string counts as line 1. If your attachment came through without extra wrapping, I'm counting this as line 195: pay_test.comment=payment.comment; (thinks about it for a bit) Actually it seems more likely that a change in the rowtype of "payment" caused this, ie some change in the output column set of that "final_query" query. Difficult to guess more than that without more context. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general