From 887206e65b6861ab75df180760f3dee8d2fdec79 Mon Sep 17 00:00:00 2001 From: dimitr Date: Wed, 16 Jan 2008 13:38:46 +0000 Subject: [PATCH] The merge is being fixed. --- .../README.column_type_psql.txt | 35 +++++++++++++++++++ doc/sql.extensions/README.domains_psql.txt | 4 +++ src/common/classes/fb_string.cpp | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 doc/sql.extensions/README.column_type_psql.txt diff --git a/doc/sql.extensions/README.column_type_psql.txt b/doc/sql.extensions/README.column_type_psql.txt new file mode 100644 index 0000000000..83e139bca7 --- /dev/null +++ b/doc/sql.extensions/README.column_type_psql.txt @@ -0,0 +1,35 @@ +------------------- +Column type in PSQL +------------------- + +Function: + Allow usage of table or view column type in PSQL. + +Author: + Adriano dos Santos Fernandes + +Syntax rules: + data_type ::= + + | + | TYPE OF + | TYPE OF 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 diff --git a/doc/sql.extensions/README.domains_psql.txt b/doc/sql.extensions/README.domains_psql.txt index c99176cfff..90fddf039f 100644 --- a/doc/sql.extensions/README.domains_psql.txt +++ b/doc/sql.extensions/README.domains_psql.txt @@ -13,6 +13,7 @@ Syntax rules: | | TYPE OF + | TYPE OF 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 diff --git a/src/common/classes/fb_string.cpp b/src/common/classes/fb_string.cpp index 0bb59dbeae..2ed81b28f3 100644 --- a/src/common/classes/fb_string.cpp +++ b/src/common/classes/fb_string.cpp @@ -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