Re: plpgsql: Plan type mismatch error

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: plpgsql: Plan type mismatch error
Дата
Msg-id 37ed240d0710152206p48bb54e3q5039ca1cf68ddd37@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plpgsql: Plan type mismatch error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: plpgsql: Plan type mismatch error  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 10/16/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Brendan Jurd" <direvus@gmail.com> writes:
> > I recently ran afoul of the following error message:
> > ERROR: type of "varname" does not match that when preparing the plan
> > IMO the message isn't quite in English and doesn't explain the problem
> > very well.
>
> The English is fine.  What I want to know about is whether this was a
> current release, and if so how you provoked it.

This was in 8.3 beta 1.  I provoked the message by having a variable
which came from a dynamic query (EXECUTE .. INTO a variable of type
RECORD), and a member of that record changed type between one
execution of the function and the next.

So the plan was cached on the first execution, and in the second
execution the type of the variable did not match the type in the plan.At least, that's what I understand happened from
lookingat the code
 
which emitted the message.

Once I knew what the message was talking about, fixing my function was
easy.  It's a useful error message, it's just not well articulated ...

Cheers,
BJ


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql: Plan type mismatch error
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: FOUND with EXECUTE