agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] the relation ID of the table on which the trigger occured.
Date: Wed, 25 May 2005 09:50:26 +0200
Message-ID: <thhal-0xcZvA9f0zTYJXwu2y5ljtHShqmiCii@mailblocks.com> (raw)
In-Reply-To: <d71a0u$lbt$1@sea.gmane.org>
References: <d71a0u$lbt$1@sea.gmane.org>
	<42942E42.9090005@mailblocks.com>
	<thhal-0xMZvA9X0zTYdkH7uFjvrCJvJ6lNMHk@mailblocks.com>

Marek Lewczuk wrote:

> Hi,
> I think that TriggerData class is missing getRelationID method - this 
> should return  OID of the table on which the trigger fired. Can I get 
> table's OID which fired the trigger in other way ?

The TriggerData.getTableName() will give you the name of the relation. 
The TriggerData interface is designed to be as database agnostic as 
possible (to allow other vendors to use the same interface) and the 
relation OID is very PostgreSQL specific.

We might add a method on the Oid class in the future. Something like:

    public static Oid forRelationName(String relationName)

but at present you must use SQL to obtain the OID.

Regards,
Thomas Hallgren






view thread (7+ messages)  latest in thread

Message-ID: <thhal-0xcZvA9f0zTYJXwu2y5ljtHShqmiCii@mailblocks.com>
Permalink:  ../thhal-0xcZvA9f0zTYJXwu2y5ljtHShqmiCii@mailblocks.com/
Also on:    postgresql.org/message-id/thhal-0xcZvA9f0zTYJXwu2y5ljtHShqmiCii@mailblocks.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] the relation ID of the table on which the trigger occured.
  In-Reply-To: <thhal-0xcZvA9f0zTYJXwu2y5ljtHShqmiCii@mailblocks.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