Re: What does this error message mean?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What does this error message mean?
Дата
Msg-id 30952.1384741204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What does this error message mean?  (Ken Tanzer <ken.tanzer@gmail.com>)
Ответы Re: What does this error message mean?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
Ken Tanzer <ken.tanzer@gmail.com> 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


В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Postgres as In-Memory Database?
Следующее
От: Tony Theodore
Дата:
Сообщение: Re: Composite types or composite keys?