Re: Assertion failure with assignment to array elem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Assertion failure with assignment to array elem
Date: 2010-08-09 16:32:04
Message-ID: 2034.1281371524@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Yeah, I don't like that either. What we need to do instead is fix
> exec_assign_value so that it can cope with the case of the caller having
> an open expression evaluation. We can easily have it save/restore
> eval_tuptable. Not resetting eval_econtext is a bit harder, but maybe
> we could have a use-count variable ... or even easier, just decree that
> the caller has to do exec_eval_cleanup after calling exec_assign_value,
> whether or not it had an open expression eval.

After a bit of experimentation, I propose the attached patch. I don't
think any additional resets of eval_econtext are necessary. There are
some callers of exec_assign_value that don't immediately do an
exec_eval_cleanup afterwards, but one will happen soon enough.

regards, tom lane

Attachment Content-Type Size
plpgsql-array-assign.patch text/x-patch 3.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2010-08-09 16:51:21 Re: Assertion failure with assignment to array elem
Previous Message Tom Lane 2010-08-09 15:32:55 Re: Assertion failure with assignment to array elem