Re: LOCK TABLE is not allowed in a non-volatile function

From: Eliot Gable <egable+pgsql-general(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: LOCK TABLE is not allowed in a non-volatile function
Date: 2012-04-18 14:18:36
Message-ID: CAD-6L_XQ-yO5B6sifxBLzBVgQ0WWKYp+DB2_1bnm8vaYOOBCSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 17, 2012 at 7:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Eliot Gable <egable+pgsql-general(at)gmail(dot)com> writes:
> > When the trigger fires, I get this in my postgres.log file:
> > 2012-04-17 16:57:15 EDT|test_db|169.254.5.138(56783)|****|[unknown]|30474
> > WARNING: Failed to materialize the live_user_activity table; code
> 0A000:
> > LOCK TABLE is not allowed in a non-volatile function
>
> > I cannot find a single non-volatile function in the call path; so I am
> > baffled on where this error message is coming from.
>
> I'm confused too, but I'm not going to guess at details of an incomplete
> example; the problem could well be related to code you didn't show us.
> Please provide a self-contained script that triggers this message.
> Also, what PG version are we talking about?
>
> regards, tom lane
>

Thanks, Tom. I will try to get an entire example put together which I can
post which will reproduce it. For your reference, the code I cut out was
just inserts, updates, selects, and if/then/else statements. There were no
other stored procedure calls or function calls present in any of the code I
cut out.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2012-04-18 14:27:20 Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Previous Message Tom Lane 2012-04-18 14:08:37 Re: Compile docs on ArchLinux