8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00
firebird-mirror/doc/sql.extensions/README.domains_psql.txt

35 lines
933 B
Plaintext
Raw Normal View History

2007-03-14 14:58:40 +01:00
---------------
Domains in PSQL
---------------
Function:
Allow usage of domains in PSQL.
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
Syntax rules:
data_type ::=
<builtin_data_type>
| <domain_name>
| TYPE OF <domain_name>
2008-01-16 14:38:46 +01:00
| TYPE OF COLUMN <table or view>.<column>
2007-03-14 14:58:40 +01:00
Examples:
CREATE DOMAIN DOM AS INTEGER;
CREATE PROCEDURE SP (I1 TYPE OF DOM, I2 DOM) RETURNS (O1 TYPE OF DOM, O2 DOM)
AS
DECLARE VARIABLE V1 TYPE OF DOM;
DECLARE VARIABLE V2 DOM;
BEGIN
END
Notes:
2007-03-15 10:14:00 +01:00
1. TYPE OF gets only the type of the domain. It doesn't use constraints and default values.
2007-03-14 14:58:40 +01:00
2. A new field RDB$VALID_BLR was added in RDB$RELATIONS and RDB$TRIGGERS to store if the procedure/trigger is valid or not after an ALTER DOMAIN.
2007-03-15 10:14:00 +01:00
3. The value of RDB$VALID_BLR is shown in ISQL commands SHOW PROCEDURE/TRIGGER.
2008-01-16 14:38:46 +01:00
See also:
README.column_type_psql.txt