Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

(click on this box to dismiss)

How to interpret trigger meta data?


when querying for trigger meta data, e.g. issuing

SELECT * FROM db_trigger

strange codes are returned for db_trigger.owner (e.g. @140|1|0) and target_class (e.g. @523|8|0). What do they mean?

And more important: How to find out which class/table name the trigger relates to?

Regards, Volker.

link comment (0)
asked 3 years ago
17 Answers

The values that you're getting are object identifiers (OID). CUBRID is an object-relational database. All tables in CUBRID are classes and they can be inherited or can inherit from other classes, also you can aggregate tables. The owner column from  db_trigger is an object of type db_user (the table db_user) and the value that you're seeing there is the OID (object identifier). 

For your actual question, the schema of the class db_trigger is described here:

It has two object columns: 

  • the field owner is an object of type db_user
  • the field target_class is an actual class
If you want to find out what triggers are defined on class 'x' you can run the query:
 SELECT * FROM db_trigger where target_class = class x;

If you want to get the name of the owner (the user) of the trigger, you can run the query:

SELECT from db_trigger where target_class = class x; 

You can find all the names of the tables which have triggers, you have to join db_trigger class with _db_class class

 SELECT c.class_name FROM _db_class c inner join db_trigger t ON t.target_class = c.class_of

See also:


link comment (0)
answered 3 years ago

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: