[Pljava-dev] Re: the relation ID of the table on which the trigger occured.

From: marek at lewczuk(dot)com (Marek Lewczuk)
To:
Subject: [Pljava-dev] Re: the relation ID of the table on which the trigger occured.
Date: 2005-05-25 08:32:59
Message-ID: 4294383B.3080507@lewczuk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Thomas Hallgren napisa?(a):
> 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.
True, but it returns only table's name, without schema name - table's
name can't be used as a true identifier of given table (because table
e.g. "pljavaexample" can exists in many schemas) and because of that
relation ID is needed.

> 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.
I understand, however that can lead to many other losts on the pljava's
functionality - PostgreSQL is very complex and it contains many unique
features, which are not available in other RDBMS.

>
> We might add a method on the Oid class in the future. Something like:
> public static Oid forRelationName(String relationName)
This will not help - you don't know the schema name (because
getTableName() doesn't return schema name).

ML

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2005-05-25 09:15:36 [Pljava-dev] Re: the relation ID of the table on which the trigger occured.
Previous Message Thomas Hallgren 2005-05-25 07:50:26 [Pljava-dev] the relation ID of the table on which the trigger occured.