TOP をテンプレートにして作成
ホーム
バックアップ
一覧
検索
最終更新
ヘルプ
ログイン
開始行
Data Definition Language (DDL)
cf) [[Firebird 2.1 Release Notes:http://www.firebirdsql.o...
* Database Trigger [#ca76b169]
(v.2.1) A database trigger is a PSQL module that is execu...
(v.2.1) データベーストリガーが追加された。これはデータベ...
The events and the timings of their triggers are as follo...
このイベントやデータベーストリガーの発生タイミングは、以...
*** CONNECT [#m17f0759]
- Database connection is established
-- データベース接続が確立されるとき
- A transaction is started
-- トランザクションが開始されるとき
- Triggers are fired; uncaught exceptions roll back the t...
-- トリガーが実行されるとき
捕捉されない例外は送出された場合、トランザクションはロー...
- The transaction is committed
-- トランザクションがコミットされるとき
*** DISCONNECT [#jcb1ed92]
- A transaction is started
-- トランザクションが開始されるとき
- Triggers are fired; uncaught exceptions roll back the t...
-- デーラベーストリガーが実行されるとき
捕捉されない例外は送出された場合、トランザクションはロー...
- The transaction is committed
-- トランザクションがコミットされるとき
- The attachment is disconnected
-- 接続が切断されたとき
*** TRANSACTION START [#g8ee614a]
- Triggers are fired in the newly-created user transactio...
-- ユーザートランザクションが新たに作られた際に発動する
捕捉されない例外は送出された場合、トランザクションはロー...
*** TRANSACTION COMMIT [#v0135211]
- Triggers are fired in the committing transaction; uncau...
トランザクションがコミットされた際に発動する。
捕捉されない例外は送出された場合、トリガーのsavepointはロ...
Note
>> For two-phase transactions, the triggers are fired in ...
>> 二相トランザクションの場合、データベーストリガーはcomm...
*** TRANSACTION ROLLBACK [#neb0bc8d]
Triggers are fired during the roll-back of the transactio...
トランザクションがロールバックされている間に発動する。
変更された内容はそのトランザクションでトールバックされる...
** Syntax [#df3fd63c]
<database-trigger> ::=
{CREATE | RECREATE | CREATE OR ALTER}
TRIGGER <name>
[ACTIVE | INACTIVE]
ON <event>
[POSITION <n>]
AS
BEGIN
...
END
<event> ::=
CONNECT
| DISCONNECT
| TRANSACTION START
| TRANSACTION COMMIT
| TRANSACTION ROLLBACK
** Rules and Restrictions [#paaaf5ea]
Database triggers type cannot be changed.
データベーストリガーの型を変更することは出来ない。
Permission to create, recreate, create or alter, or drop ...
データベーストリガーの作成、変更、削除はデータベースオー...
** Utilities Support for Database Triggers [#k37d9a6f]
New parameters were added to gbak, nbackup and isql to su...
gbak、nbackup、isqlコマンドに、データベーストリガーをサポ...
They are available only to the database owner and SYSDBA:
これらはデータベースオーナーまたはSYSDBAユーザーのみ行う...
gbak -nodbtriggers
isql -nodbtriggers
nbackup -T
* Global Temporary Tables (GTT) [#pe9600d5]
Vlad Khorsun
(v.2.1) Global temporary tables (GTTs) are tables that ar...
(v.2.1) グローバルテンポラリテーブルとは、一時データでは...
Data from different connections (or transactions, dependi...
異なる接続(またはスコープ依存の異なるトランザクション)...
*** There are two kinds of GTT: [#xa407353]
- with data that persists for the lifetime of connection ...
-- 指定されたGTTが参照される接続が生存している間に永続さ...
- with data that persists only for the lifetime of the re...
-- GTTを参照しているトランザクションの生存期間のみ永続さ...
** Syntax and Rules for GTTs [#nd646a7c]
CREATE GLOBAL TEMPORARY TABLE
...
[ON COMMIT <DELETE | PRESERVE> ROWS]
Creates the metadata for the temporary table in the syste...
システムカタログにテンポラリテーブルのメタデータを作成する
The clause ON COMMIT sets the kind of temporary table:
ON COMMIT句はテンポラリテーブルの種類をセットする
- ON COMMIT PRESERVE ROWS
Data left in the given table after the end of the transac...
トランザクション終了後にテンポラリテーブルに残ったデータ...
- ON COMMIT DELETE ROWS
Data in the given table are deleted from the database imm...
トランザクション終了後、テンポラリテーブルに残ったデータ...
ON COMMIT DELETE ROWS is used by default if the optional ...
ON COMMIT DELETE ROWSは、ON COMMIT句が指定されない場合の...
- CREATE GLOBAL TEMPORARY TABLE
is a regular DDL statement that is processed by the engin...
CREATE TABLEが実行された時と同じ方法で、データベースエン...
Accordingly, it not possible to create or drop a GTT with...
それ故、ストアドプロシージャやトリガーの中でGTTを作成した...
** Relation Type [#tbb44794]
GTT definitions are distinguished in the system catalogue...
GTT定義は、システムカタログ内のRDB$RELATIONSの値によって...
RDB$RELATION_TYPE:
A GTT with ON COMMIT PRESERVE ROWS option has RDB$RELATIO...
ON COMMIT PRESERVE ROWSが指定されてGTTが作成された場合、R...
A GTT with ON COMMIT DELETE ROWS option has RDB$RELATION_...
ON COMMIT DELETE ROWSが指定されてGTTが作成された場合、RDB...
Note
For the full list of values, see RDB$TYPES.
RDB$RELATION_TYPE で使われるすべての値については、RDB$TYP...
** Structural Feature Support [#y91d15ca]
The same structural features that you can apply to regula...
GTTや正規のテーブルが相互に正規に関連づける方法である種の...
references between persistent and temporary tables are fo...
- 永続テーブルとテンポラリテーブルの間で参照はできない。
A GTT with ON COMMIT PRESERVE ROWS cannot have a referenc...
- ON COMMIT PRESERVE ROWSをもったGTTは、ON COMMIT DELETE ...
A domain constraint cannot have a reference to any GTT.
- ドメイン制約はすべてのGTTへの参照をもつことができない
** Implementation Notes [#i83b0ed8]
An instance of a GTT—a set of data rows created by and vi...
GTTのインスタンス(与えられた接続やトランザクションの中で...
Each instance has its own private set of pages on which d...
各々のインスタンスは、データやインデックスが貯蔵されたプ...
The data rows and indexes have the same physical storage ...
データ行やインデックスは正規のテーブルと同じ物理的なスト...
When the connection or transaction ends, all pages of a G...
接続やトランザクションが終了したとき、GTTインスタンスのの...
It is similar to what happens when a DROP TABLE is perfor...
これは、メタデータ定義が保持されることを除いて、DROP TABL...
This is much quicker than the traditional row-by-row dele...
これは、昔ながらの行ごとの削除+削除されたレコードバージ...
Note
This method of deletion does not cause DELETE triggers to...
この削除の方法は、いくつかの種類の"last rites"を含めれる...
The data and index pages of all GTT instances are placed ...
GTTインスタンスのデータやインデックスページは分離されたテ...
Each connection has its own temporary file created the fi...
各々の接続は、初回の接続時にいくつかのGTTを参照する作成さ...
Note
These temporary files are always opened with Forced Write...
これらのテンポラリファイルはいつもForced Writes = OFFでオ...
No limit is placed on the number of GTT instances that ca...
共存できるGTTインスタンスの数に制限は無い。
If you have N transactions active simultaneously and each...
同時にN個のアクティブなトランザクションをもっており、各々...
* Views Enhancements [#yb88e0f6]
D. Yemanov
A couple of enhancements were made to view definitions in...
Use Column Aliases in CREATE VIEW
Feature requestCORE-831
(v.2.1) Column aliases can now be processed as column nam...
Example
CREATE VIEW V_TEST AS
SELECT ID,
COL1 AS CODE,
COL2 AS NAME
FROM TAB;
SQL2003 compliance for CREATE TRIGGER
A. dos Santos Fernandes
Feature request CORE-711
(v.2.1) Alternative syntax is now available for CREATE TR...
Syntax Patterns
Existing Form
create trigger t1
FOR atable
[active] before insert or update
as
begin
...
end
SQL2003 Form
create trigger t2
[active] before insert or update
ON atable
as
begin
...
end
Note the different positions of the clause identifying th...
Both syntaxes are valid and are available also for all CR...
SQL2003 Compliant Alternative for Computed Fields
D. Yemanov
Feature request CORE-1386
(v.2.1) SQL-compliant alternative syntax GENERATED ALWAYS...
Syntax Pattern
<column name> [<type>] GENERATED ALWAYS AS ( <expr> )
It is fully equivalent semantically with the legacy form:
<column name> [<type>] COMPUTED [BY] ( <expr> )
Example
CREATE TABLE T (PK INT, EXPR GENERATED ALWAYS AS (PK + 1))
CREATE SEQUENCE
D. Yemanov
SEQUENCE has been introduced as a synonym for GENERATOR, ...
A sequence generator is a mechanism for generating succes...
Syntax patterns
CREATE { SEQUENCE | GENERATOR } <name>
DROP { SEQUENCE | GENERATOR } <name>
SET GENERATOR <name> TO <start_value>
ALTER SEQUENCE <name> RESTART WITH <start_value>
GEN_ID (<name>, <increment_value>)
NEXT VALUE FOR <name>
Examples
1.
CREATE SEQUENCE S_EMPLOYEE;
2.
ALTER SEQUENCE S_EMPLOYEE RESTART WITH 0;
See also the notes about NEXT VALUE FOR.
Warning
ALTER SEQUENCE, like SET GENERATOR, is a good way to scre...
REVOKE ADMIN OPTION
D. Yemanov
SYSDBA, the database creator or the owner of an object ca...
However, there's a second form that involves roles. Inste...
By using WITH ADMIN OPTION, the grantor (typically the ro...
SET/DROP DEFAULT Clauses for ALTER TABLE
C. Valderrama
Domains allow their defaults to be changed or dropped. It...
Syntax Pattern
ALTER TABLE t ALTER [COLUMN] c SET DEFAULT default_value;
ALTER TABLE t ALTER [COLUMN] c DROP DEFAULT;
Note
Array fields cannot have a default value.
If you change the type of a field, its default may remain...
Syntaxes for Changing Exceptions
D. Yemanov
The DDL statements RECREATE EXCEPTION and CREATE OR ALTER...
RECREATE EXCEPTION
RECREATE EXCEPTION is exactly like CREATE EXCEPTION if th...
CREATE OR ALTER EXCEPTION
CREATE OR ALTER EXCEPTION will create the exception if it...
ALTER EXTERNAL FUNCTION
C. Valderrama
ALTER EXTERNAL FUNCTION has been implemented, to enable t...
COMMENT Statement
C. Valderrama
The COMMENT statement has been implemented for setting me...
Syntax Pattern
COMMENT ON DATABASE IS {'txt'|NULL};
COMMENT ON <basic_type> name IS {'txt'|NULL};
COMMENT ON COLUMN tblviewname.fieldname IS {'txt'|NULL};
COMMENT ON PARAMETER procname.parname IS {'txt'|NULL};
An empty literal string '' will act as NULL since the int...
<basic_type>:
DOMAIN
TABLE
VIEW
PROCEDURE
TRIGGER
EXTERNAL FUNCTION
FILTER
EXCEPTION
GENERATOR
SEQUENCE
INDEX
ROLE
CHARACTER SET
COLLATION
SECURITY CLASS1
1not implemented, because this type is hidden.
Extensions to CREATE VIEW Specification
D. Yemanov
FIRST/SKIP and ROWS syntaxes and PLAN and ORDER BY clause...
From Firebird 2.0 onward, views are treated as fully-feat...
Syntax
For syntax details, refer to Select Statement & Expressio...
RECREATE TRIGGER Statement Implemented
D. Yemanov
The DDL statement RECREATE TRIGGER statement is now avail...
Usage Enhancements
The following changes will affect usage or existing, pre-...
Creating Foreign Key Constraints No Longer Requires Exclu...
V. Horsun
Now it is possible to create foreign key constraints with...
Changed Logic for View Updates
Apply NOT NULL constraints to base tables only, ignoring ...
Descriptive Identifiers for BLOB Subtypes
A. Peshkov, C. Valderrama
Previously, the only allowed syntax for declaring a blob ...
declare filter <name> input_type <number> output_type ...
entry_point <function_in_library> module_name <libra...
The alternative new syntax is:
declare filter <name> input_type <mnemonic> output_typ...
entry_point <function_in_library> module_name <libra...
where <mnemonic> refers to a subtype identifier known to ...
Initially they are binary, text and others mostly for int...
To get the predefined types, do
select RDB$TYPE, RDB$TYPE_NAME, RDB$SYSTEM_FLAG
from rdb$types
where rdb$field_name = 'RDB$FIELD_SUB_TYPE';
RDB$TYPE RDB$TYPE_NAME RDB$SYSTEM_FLAG
========= ============================ =================
0 BINARY 1
1 TEXT 1
2 BLR 1
3 ACL 1
4 RANGES 1
5 SUMMARY 1
6 FORMAT 1
7 TRANSACTION_DESCRIPTION 1
8 EXTERNAL_FILE_DESCRIPTION 1
Examples
Original declaration:
declare filter pesh input_type 0 output_type 3
entry_point 'f' module_name 'p';
Alternative declaration:
declare filter pesh input_type binary output_type acl
entry_point 'f' module_name 'p';
Declaring a name for a user defined blob subtype (remembe...
SQL> insert into rdb$types
CON> values('RDB$FIELD_SUB_TYPE', -100, 'XDR', 'test ty...
SQL> commit;
SQL> declare filter pesh2 input_type xdr output_type text
CON> entry_point 'p2' module_name 'p';
SQL> show filter pesh2;
BLOB Filter: PESH2
Input subtype: -100 Output subtype: 1
Filter library is p
Entry point is p2
最終行:
Data Definition Language (DDL)
cf) [[Firebird 2.1 Release Notes:http://www.firebirdsql.o...
* Database Trigger [#ca76b169]
(v.2.1) A database trigger is a PSQL module that is execu...
(v.2.1) データベーストリガーが追加された。これはデータベ...
The events and the timings of their triggers are as follo...
このイベントやデータベーストリガーの発生タイミングは、以...
*** CONNECT [#m17f0759]
- Database connection is established
-- データベース接続が確立されるとき
- A transaction is started
-- トランザクションが開始されるとき
- Triggers are fired; uncaught exceptions roll back the t...
-- トリガーが実行されるとき
捕捉されない例外は送出された場合、トランザクションはロー...
- The transaction is committed
-- トランザクションがコミットされるとき
*** DISCONNECT [#jcb1ed92]
- A transaction is started
-- トランザクションが開始されるとき
- Triggers are fired; uncaught exceptions roll back the t...
-- デーラベーストリガーが実行されるとき
捕捉されない例外は送出された場合、トランザクションはロー...
- The transaction is committed
-- トランザクションがコミットされるとき
- The attachment is disconnected
-- 接続が切断されたとき
*** TRANSACTION START [#g8ee614a]
- Triggers are fired in the newly-created user transactio...
-- ユーザートランザクションが新たに作られた際に発動する
捕捉されない例外は送出された場合、トランザクションはロー...
*** TRANSACTION COMMIT [#v0135211]
- Triggers are fired in the committing transaction; uncau...
トランザクションがコミットされた際に発動する。
捕捉されない例外は送出された場合、トリガーのsavepointはロ...
Note
>> For two-phase transactions, the triggers are fired in ...
>> 二相トランザクションの場合、データベーストリガーはcomm...
*** TRANSACTION ROLLBACK [#neb0bc8d]
Triggers are fired during the roll-back of the transactio...
トランザクションがロールバックされている間に発動する。
変更された内容はそのトランザクションでトールバックされる...
** Syntax [#df3fd63c]
<database-trigger> ::=
{CREATE | RECREATE | CREATE OR ALTER}
TRIGGER <name>
[ACTIVE | INACTIVE]
ON <event>
[POSITION <n>]
AS
BEGIN
...
END
<event> ::=
CONNECT
| DISCONNECT
| TRANSACTION START
| TRANSACTION COMMIT
| TRANSACTION ROLLBACK
** Rules and Restrictions [#paaaf5ea]
Database triggers type cannot be changed.
データベーストリガーの型を変更することは出来ない。
Permission to create, recreate, create or alter, or drop ...
データベーストリガーの作成、変更、削除はデータベースオー...
** Utilities Support for Database Triggers [#k37d9a6f]
New parameters were added to gbak, nbackup and isql to su...
gbak、nbackup、isqlコマンドに、データベーストリガーをサポ...
They are available only to the database owner and SYSDBA:
これらはデータベースオーナーまたはSYSDBAユーザーのみ行う...
gbak -nodbtriggers
isql -nodbtriggers
nbackup -T
* Global Temporary Tables (GTT) [#pe9600d5]
Vlad Khorsun
(v.2.1) Global temporary tables (GTTs) are tables that ar...
(v.2.1) グローバルテンポラリテーブルとは、一時データでは...
Data from different connections (or transactions, dependi...
異なる接続(またはスコープ依存の異なるトランザクション)...
*** There are two kinds of GTT: [#xa407353]
- with data that persists for the lifetime of connection ...
-- 指定されたGTTが参照される接続が生存している間に永続さ...
- with data that persists only for the lifetime of the re...
-- GTTを参照しているトランザクションの生存期間のみ永続さ...
** Syntax and Rules for GTTs [#nd646a7c]
CREATE GLOBAL TEMPORARY TABLE
...
[ON COMMIT <DELETE | PRESERVE> ROWS]
Creates the metadata for the temporary table in the syste...
システムカタログにテンポラリテーブルのメタデータを作成する
The clause ON COMMIT sets the kind of temporary table:
ON COMMIT句はテンポラリテーブルの種類をセットする
- ON COMMIT PRESERVE ROWS
Data left in the given table after the end of the transac...
トランザクション終了後にテンポラリテーブルに残ったデータ...
- ON COMMIT DELETE ROWS
Data in the given table are deleted from the database imm...
トランザクション終了後、テンポラリテーブルに残ったデータ...
ON COMMIT DELETE ROWS is used by default if the optional ...
ON COMMIT DELETE ROWSは、ON COMMIT句が指定されない場合の...
- CREATE GLOBAL TEMPORARY TABLE
is a regular DDL statement that is processed by the engin...
CREATE TABLEが実行された時と同じ方法で、データベースエン...
Accordingly, it not possible to create or drop a GTT with...
それ故、ストアドプロシージャやトリガーの中でGTTを作成した...
** Relation Type [#tbb44794]
GTT definitions are distinguished in the system catalogue...
GTT定義は、システムカタログ内のRDB$RELATIONSの値によって...
RDB$RELATION_TYPE:
A GTT with ON COMMIT PRESERVE ROWS option has RDB$RELATIO...
ON COMMIT PRESERVE ROWSが指定されてGTTが作成された場合、R...
A GTT with ON COMMIT DELETE ROWS option has RDB$RELATION_...
ON COMMIT DELETE ROWSが指定されてGTTが作成された場合、RDB...
Note
For the full list of values, see RDB$TYPES.
RDB$RELATION_TYPE で使われるすべての値については、RDB$TYP...
** Structural Feature Support [#y91d15ca]
The same structural features that you can apply to regula...
GTTや正規のテーブルが相互に正規に関連づける方法である種の...
references between persistent and temporary tables are fo...
- 永続テーブルとテンポラリテーブルの間で参照はできない。
A GTT with ON COMMIT PRESERVE ROWS cannot have a referenc...
- ON COMMIT PRESERVE ROWSをもったGTTは、ON COMMIT DELETE ...
A domain constraint cannot have a reference to any GTT.
- ドメイン制約はすべてのGTTへの参照をもつことができない
** Implementation Notes [#i83b0ed8]
An instance of a GTT—a set of data rows created by and vi...
GTTのインスタンス(与えられた接続やトランザクションの中で...
Each instance has its own private set of pages on which d...
各々のインスタンスは、データやインデックスが貯蔵されたプ...
The data rows and indexes have the same physical storage ...
データ行やインデックスは正規のテーブルと同じ物理的なスト...
When the connection or transaction ends, all pages of a G...
接続やトランザクションが終了したとき、GTTインスタンスのの...
It is similar to what happens when a DROP TABLE is perfor...
これは、メタデータ定義が保持されることを除いて、DROP TABL...
This is much quicker than the traditional row-by-row dele...
これは、昔ながらの行ごとの削除+削除されたレコードバージ...
Note
This method of deletion does not cause DELETE triggers to...
この削除の方法は、いくつかの種類の"last rites"を含めれる...
The data and index pages of all GTT instances are placed ...
GTTインスタンスのデータやインデックスページは分離されたテ...
Each connection has its own temporary file created the fi...
各々の接続は、初回の接続時にいくつかのGTTを参照する作成さ...
Note
These temporary files are always opened with Forced Write...
これらのテンポラリファイルはいつもForced Writes = OFFでオ...
No limit is placed on the number of GTT instances that ca...
共存できるGTTインスタンスの数に制限は無い。
If you have N transactions active simultaneously and each...
同時にN個のアクティブなトランザクションをもっており、各々...
* Views Enhancements [#yb88e0f6]
D. Yemanov
A couple of enhancements were made to view definitions in...
Use Column Aliases in CREATE VIEW
Feature requestCORE-831
(v.2.1) Column aliases can now be processed as column nam...
Example
CREATE VIEW V_TEST AS
SELECT ID,
COL1 AS CODE,
COL2 AS NAME
FROM TAB;
SQL2003 compliance for CREATE TRIGGER
A. dos Santos Fernandes
Feature request CORE-711
(v.2.1) Alternative syntax is now available for CREATE TR...
Syntax Patterns
Existing Form
create trigger t1
FOR atable
[active] before insert or update
as
begin
...
end
SQL2003 Form
create trigger t2
[active] before insert or update
ON atable
as
begin
...
end
Note the different positions of the clause identifying th...
Both syntaxes are valid and are available also for all CR...
SQL2003 Compliant Alternative for Computed Fields
D. Yemanov
Feature request CORE-1386
(v.2.1) SQL-compliant alternative syntax GENERATED ALWAYS...
Syntax Pattern
<column name> [<type>] GENERATED ALWAYS AS ( <expr> )
It is fully equivalent semantically with the legacy form:
<column name> [<type>] COMPUTED [BY] ( <expr> )
Example
CREATE TABLE T (PK INT, EXPR GENERATED ALWAYS AS (PK + 1))
CREATE SEQUENCE
D. Yemanov
SEQUENCE has been introduced as a synonym for GENERATOR, ...
A sequence generator is a mechanism for generating succes...
Syntax patterns
CREATE { SEQUENCE | GENERATOR } <name>
DROP { SEQUENCE | GENERATOR } <name>
SET GENERATOR <name> TO <start_value>
ALTER SEQUENCE <name> RESTART WITH <start_value>
GEN_ID (<name>, <increment_value>)
NEXT VALUE FOR <name>
Examples
1.
CREATE SEQUENCE S_EMPLOYEE;
2.
ALTER SEQUENCE S_EMPLOYEE RESTART WITH 0;
See also the notes about NEXT VALUE FOR.
Warning
ALTER SEQUENCE, like SET GENERATOR, is a good way to scre...
REVOKE ADMIN OPTION
D. Yemanov
SYSDBA, the database creator or the owner of an object ca...
However, there's a second form that involves roles. Inste...
By using WITH ADMIN OPTION, the grantor (typically the ro...
SET/DROP DEFAULT Clauses for ALTER TABLE
C. Valderrama
Domains allow their defaults to be changed or dropped. It...
Syntax Pattern
ALTER TABLE t ALTER [COLUMN] c SET DEFAULT default_value;
ALTER TABLE t ALTER [COLUMN] c DROP DEFAULT;
Note
Array fields cannot have a default value.
If you change the type of a field, its default may remain...
Syntaxes for Changing Exceptions
D. Yemanov
The DDL statements RECREATE EXCEPTION and CREATE OR ALTER...
RECREATE EXCEPTION
RECREATE EXCEPTION is exactly like CREATE EXCEPTION if th...
CREATE OR ALTER EXCEPTION
CREATE OR ALTER EXCEPTION will create the exception if it...
ALTER EXTERNAL FUNCTION
C. Valderrama
ALTER EXTERNAL FUNCTION has been implemented, to enable t...
COMMENT Statement
C. Valderrama
The COMMENT statement has been implemented for setting me...
Syntax Pattern
COMMENT ON DATABASE IS {'txt'|NULL};
COMMENT ON <basic_type> name IS {'txt'|NULL};
COMMENT ON COLUMN tblviewname.fieldname IS {'txt'|NULL};
COMMENT ON PARAMETER procname.parname IS {'txt'|NULL};
An empty literal string '' will act as NULL since the int...
<basic_type>:
DOMAIN
TABLE
VIEW
PROCEDURE
TRIGGER
EXTERNAL FUNCTION
FILTER
EXCEPTION
GENERATOR
SEQUENCE
INDEX
ROLE
CHARACTER SET
COLLATION
SECURITY CLASS1
1not implemented, because this type is hidden.
Extensions to CREATE VIEW Specification
D. Yemanov
FIRST/SKIP and ROWS syntaxes and PLAN and ORDER BY clause...
From Firebird 2.0 onward, views are treated as fully-feat...
Syntax
For syntax details, refer to Select Statement & Expressio...
RECREATE TRIGGER Statement Implemented
D. Yemanov
The DDL statement RECREATE TRIGGER statement is now avail...
Usage Enhancements
The following changes will affect usage or existing, pre-...
Creating Foreign Key Constraints No Longer Requires Exclu...
V. Horsun
Now it is possible to create foreign key constraints with...
Changed Logic for View Updates
Apply NOT NULL constraints to base tables only, ignoring ...
Descriptive Identifiers for BLOB Subtypes
A. Peshkov, C. Valderrama
Previously, the only allowed syntax for declaring a blob ...
declare filter <name> input_type <number> output_type ...
entry_point <function_in_library> module_name <libra...
The alternative new syntax is:
declare filter <name> input_type <mnemonic> output_typ...
entry_point <function_in_library> module_name <libra...
where <mnemonic> refers to a subtype identifier known to ...
Initially they are binary, text and others mostly for int...
To get the predefined types, do
select RDB$TYPE, RDB$TYPE_NAME, RDB$SYSTEM_FLAG
from rdb$types
where rdb$field_name = 'RDB$FIELD_SUB_TYPE';
RDB$TYPE RDB$TYPE_NAME RDB$SYSTEM_FLAG
========= ============================ =================
0 BINARY 1
1 TEXT 1
2 BLR 1
3 ACL 1
4 RANGES 1
5 SUMMARY 1
6 FORMAT 1
7 TRANSACTION_DESCRIPTION 1
8 EXTERNAL_FILE_DESCRIPTION 1
Examples
Original declaration:
declare filter pesh input_type 0 output_type 3
entry_point 'f' module_name 'p';
Alternative declaration:
declare filter pesh input_type binary output_type acl
entry_point 'f' module_name 'p';
Declaring a name for a user defined blob subtype (remembe...
SQL> insert into rdb$types
CON> values('RDB$FIELD_SUB_TYPE', -100, 'XDR', 'test ty...
SQL> commit;
SQL> declare filter pesh2 input_type xdr output_type text
CON> entry_point 'p2' module_name 'p';
SQL> show filter pesh2;
BLOB Filter: PESH2
Input subtype: -100 Output subtype: 1
Filter library is p
Entry point is p2
ページ名:
新規
名前変更
ホーム
一覧
検索
最終更新
バックアップ
ヘルプ
最終更新のRSS