agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] ResultSet is read-only error for Trigger?
Date: Wed, 5 Mar 2008 12:31:54 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0803051226440.19761@leary.csoft.net> (raw)
In-Reply-To: <56DA5079467D1C48B857C6FE59D5D4FCF9A05F@prodeaserve.prodea.local>
References: <56DA5079467D1C48B857C6FE59D5D4FCF9A05F@prodeaserve.prodea.local>



On Wed, 5 Mar 2008, Mike Toler wrote:

> I'm trying to do a very simple trigger  before moving onto the complex
> stuff that I need pljava for.
>
> 		CREATE TRIGGER provisionorder_trigger
> 		  AFTER UPDATE
> 		  ON serviceproviderprovisioned
> 		  FOR EACH ROW
> 		  EXECUTE PROCEDURE provisionorder();
>
> When I update my row, I see the following error:
> ERROR:  org.postgresql.pljava.jdbc.UnsupportedFeatureException: Feature
> not supported: ResultSet is read-only
>

I think the problem is that you're using an after trigger instead of a 
before trigger.  Before the update you can manipulate the values and have 
them persisted, but after the update you get the values that did come 
through and it's read-only at that point.

Kris Jurka




view thread (3+ messages)  latest in thread

Message-ID: <Pine.BSO.4.64.0803051226440.19761@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0803051226440.19761@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0803051226440.19761@leary.csoft.net

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] ResultSet is read-only error for Trigger?
  In-Reply-To: <Pine.BSO.4.64.0803051226440.19761@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox