agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Triggerdata questions
Date: Tue, 5 Jul 2005 19:03:52 +0100
Message-ID: <ce04e69f050705110339fc5c9e@mail.gmail.com> (raw)
Hi everyone,
I have a number of tables in a db, let's call it Main, which are a
replication of tables that are in other databases (more than one). All
the tables in db Main are empty, they are just used for front end
access and defining the relations that may exist between the tables
from the different databases.
When an insert (for ex.) is issued to db Main a trigger is fired
that calls a java function that supposedly would re-issue the insert
to the real db. But i don't know how this can be done. Using the
triggerdata passed to my function i tried the following:
(being td the Triggerdata received by the function)
Statement stat = (td.getNew()).getStatement();
The function always throws a nullPointerException. From what i've
read, the resultSet returned by .getNew() is always null on inserts
and deletes, so this must be where the exception comes from, but even
on an update the resultSet seems to be returning a null value.
And what i want to ask you is if you think this can be done this
way? If so, what am i doing wrong? If not, do you see another
solution?
Thanks in advance.
view thread (2+ messages) latest in thread
Message-ID: <ce04e69f050705110339fc5c9e@mail.gmail.com>
Permalink: ../ce04e69f050705110339fc5c9e@mail.gmail.com/
Also on: postgresql.org/message-id/ce04e69f050705110339fc5c9e@mail.gmail.com
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] Triggerdata questions
In-Reply-To: <ce04e69f050705110339fc5c9e@mail.gmail.com>
* 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