From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Brendan Jurd" <direvus(at)gmail(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: plpgsql: Plan type mismatch error |
Date: | 2007-10-16 05:15:20 |
Message-ID: | 162867790710152215q633aef4fw31e6bc20793281f1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2007/10/16, Brendan Jurd <direvus(at)gmail(dot)com>:
> On 10/16/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Brendan Jurd" <direvus(at)gmail(dot)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 looking at 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
>
please, read:
http://www.pgsql.cz/index.php/Automatic_execution_plan_caching_in_PL/pgSQL
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2007-10-16 05:30:46 | Re: plpgsql: Plan type mismatch error |
Previous Message | ITAGAKI Takahiro | 2007-10-16 05:11:20 | Re: V3 protocol is slower than V2 |