8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 14:43:03 +01:00

The merge is being fixed.

This commit is contained in:
dimitr 2008-01-16 13:38:46 +00:00
parent 7ad660b097
commit 887206e65b
3 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,35 @@
-------------------
Column type in PSQL
-------------------
Function:
Allow usage of table or view column type in PSQL.
Author:
Adriano dos Santos Fernandes <adrianosf@uol.com.br>
Syntax rules:
data_type ::=
<builtin_data_type>
| <domain_name>
| TYPE OF <domain_name>
| TYPE OF COLUMN <table or view>.<column>
Examples:
CREATE TABLE PERSON (ID INTEGER, NAME VARCHAR(40));
CREATE PROCEDURE SP_INS_PERSON
(ID TYPE OF COLUMN PERSON.ID, NAME TYPE OF COLUMN PERSON.NAME)
AS
DECLARE VARIABLE NEW_ID TYPE OF COLUMN PERSON.ID;
BEGIN
INSERT INTO PERSON (ID, NAME)
VALUES (:ID, :NAME)
RETURNING ID INTO :NEW_ID;
END
Notes:
1. TYPE OF COLUMN gets only the type of the column. It doesn't use constraints and default values.
See also:
README.domains_psql.txt

View File

@ -13,6 +13,7 @@ Syntax rules:
<builtin_data_type>
| <domain_name>
| TYPE OF <domain_name>
| TYPE OF COLUMN <table or view>.<column>
Examples:
CREATE DOMAIN DOM AS INTEGER;
@ -28,3 +29,6 @@ Notes:
1. TYPE OF gets only the type of the domain. It doesn't use constraints and default values.
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.
3. The value of RDB$VALID_BLR is shown in ISQL commands SHOW PROCEDURE/TRIGGER.
See also:
README.column_type_psql.txt

View File

@ -362,7 +362,7 @@ extern "C" {
#define FB_VA_COPY(to, from) va_copy(to, from)
#define FB_CLOSE_VACOPY(to) va_end(to)
#else
#define FB_VA_COPY(to, from) memcpy(to, from, sizeof (va_list))
#define FB_VA_COPY(to, from) to = from
#define FB_CLOSE_VACOPY(to)
#endif