Google
 

Rabu, 17 Oktober 2007

Firebird 2.1 beta2 is OUT

Firebird 2.1 beta 2 is out now, it's time to explore the new feature. It's hope the last beta version and after that it will go to Release Candidate version :)

The release notes of that version is in here. Many new feature that make it more interesting like Common Table Expression, aggregate function LIST, many build in function (that make us not needed to add UDF manually), built in monitoring table, and the cool one "Domain in PSQL"!!. It like FB have a feature plus than M$ SQL Server 2005 :) (CMIIW).

Firebird System Table (Part VI)

Here maybe the last system table (that I really used in in my daily program) I would like to share, that system table is (I) called a "constraint system trigger" (I don't know the correct name for this data, so I just called like that ^_^ CMIIW). I usually also find the error in query that has the name like this "CHECK_xx", so to find the table that has this contraint then I create a view like this:

CREATE VIEW "vSYS_FindSystemTrigger"(
"triggerName",
"tableName",
"triggerInactive",
"triggerType")
AS
select r.rdb$trigger_name, r.rdb$relation_name, r.rdb$trigger_inactive, r.rdb$trigger_type
from rdb$triggers r
where r.rdb$system_flag = 4;

In that query I don't know the meaning of the "triggerType", so if one of you know the meaning of that field, please add a comment in here. It can give other Firebird users more knowledge :)

Firebird System Table (Part V)

In this part V, I would like to share the system table that list the constraint of the database. I often use this view to find which constraint that make an error on my program (the table that the constraint belongs on, or just the index name that cause the error).

As we know in Delphi if our query make an error then if you trap the exception, it will show the name of the constraint error (if the error caused by constraint error).

CREATE VIEW "vSYS_FindConstraint"(
"consTipe",
"tableName",
"consName",
"indexName")
AS
select c.rdb$constraint_type, c.rdb$relation_name, c.rdb$constraint_name, c.rdb$index_name
from rdb$relation_constraints c

Jumat, 05 Oktober 2007

Firebird System Tables (Part IV)

The system table for stored procedure is like here. The purpose of this view is the same like in Firebird System Table (Part II).

CREATE VIEW "vSYS_FindProcSource"(
"procName",
"procSource")
AS
select r.rdb$procedure_name, r.rdb$procedure_source
from rdb$procedures r
where r.rdb$system_flag = 0;