hvlad 240f5d25e7 Correct documentation for isc_info_creation_date 20 лет назад
..
README.PSQL_stack_trace.txt 89af0c2a66 Little corrections. 21 лет назад
README.aggregate_tracking 70ac4f226c Please give some comments 22 лет назад
README.case 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.coalesce 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.context_variables 735f10b5a1 More docs. 21 лет назад
README.context_variables2 e46c68c9d2 no message 21 лет назад
README.current_time d094341e79 Typo. 20 лет назад
README.cursors 735f10b5a1 More docs. 21 лет назад
README.data_type_results_of_aggregations.txt 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.data_types 37278240a9 no message 22 лет назад
README.ddl.txt 24d11d0b36 Document the blob filter restriction in FB2. 20 лет назад
README.default_parameters c0e9a56fc8 1. Added new EXECUTE BLOCK statement 22 лет назад
README.derived_tables.txt 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.distinct a77d9e3a79 More docs. 21 лет назад
README.exception_handling ce14c3057d Added some documentation for RelNotes. More will follow shortly. 22 лет назад
README.execute_block c0e9a56fc8 1. Added new EXECUTE BLOCK statement 22 лет назад
README.execute_statement 75c35844b8 Added security note 22 лет назад
README.explicit_locks 4234b34098 Fix typo 22 лет назад
README.expression_indices f472ed3086 More docs. 21 лет назад
README.iif dc04b6d07c More docs. 21 лет назад
README.isc_info_xxx 240f5d25e7 Correct documentation for isc_info_creation_date 20 лет назад
README.keywords 2f7b27ac45 Added some docs. 20 лет назад
README.leave_labels d44367f80b Added some docs. 21 лет назад
README.length 59213efe7e Merge INTL branch into HEAD 20 лет назад
README.null_value fe5aa5e822 Placeholders for further docs. 21 лет назад
README.nullif 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.order_by_expressions_nulls b607034b35 Correct docs a little 22 лет назад
README.plan 607816519d Minor fixes. 21 лет назад
README.returning 8b4ba818ee Updated docs. 20 лет назад
README.rows f472ed3086 More docs. 21 лет назад
README.savepoints 9f6ac0a96f Added docs for savepoints 22 лет назад
README.select_expressions 43e6fc05c8 Corrections, thanks to Claudio. 20 лет назад
README.sequence_generators 607816519d Minor fixes. 21 лет назад
README.set_transaction.txt 322d28a1c7 Add documentation for the extra options exposed through the DSQL's SET TRANSACTION command. This functionality exists already using TPB's. 20 лет назад
README.trim 59213efe7e Merge INTL branch into HEAD 20 лет назад
README.universal_triggers 4ec2700475 Fixed typos. 20 лет назад
README.view_updates fe5aa5e822 Placeholders for further docs. 21 лет назад

README.PSQL_stack_trace.txt

PSQL stack trace

Function:
Send to client within status-vector simple stack trace with names of stored procedures
and/or triggers. Status-vector appends with following items :

isc_stack_trace, isc_arg_string, ,

isc_stack_trace is a new error code with value of 335544842L

Stack trace is represented by one string and consists from all the sp/trigger names
starting from point where exception occurred up to most outer caller. Maximum length of
that string is 2048 bytes. If actual trace is longer then it will be truncated to this limit.

Author:
Vlad Horsun

Examples:

0. Create metadata:

CREATE TABLE ERR (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(16));

CREATE EXCEPTION EX '!';

CREATE OR ALTER PROCEDURE ERR_1 AS
BEGIN
EXCEPTION EX 'ID = 3';
END;

CREATE OR ALTER TRIGGER ERR_BI FOR ERR BEFORE INSERT AS
BEGIN
IF (NEW.ID = 2)
THEN EXCEPTION EX 'ID = 2';

IF (NEW.ID = 3)
THEN EXECUTE PROCEDURE ERR_1;

IF (NEW.ID = 4)
THEN NEW.ID = 1 / 0;
END;

CREATE OR ALTER PROCEDURE ERR_2 AS
BEGIN
INSERT INTO ERR VALUES (3, '333');
END;



1. User exception from trigger:

SQL> INSERT INTO ERR VALUES (2, '2');
Statement failed, SQLCODE = -836
exception 3
-ID = 2
-At trigger 'ERR_BI'


2. User exception from procedure called by trigger:

SQL> INSERT INTO ERR VALUES (3, '3');
Statement failed, SQLCODE = -836
exception 3
-ID = 3
-At procedure 'ERR_1'
At trigger 'ERR_BI'


3. Division by zero occurred in trigger:

SQL> INSERT INTO ERR VALUES (4, '4');
Statement failed, SQLCODE = -802
arithmetic exception, numeric overflow, or string truncation
-At trigger 'ERR_BI'


4. User exception from procedure:

SQL> EXECUTE PROCEDURE ERR_1;
Statement failed, SQLCODE = -836
exception 3
-ID = 3
-At procedure 'ERR_1'


5. User exception from procedure with more deep call stack:

SQL> EXECUTE PROCEDURE ERR_2;
Statement failed, SQLCODE = -836
exception 3
-ID = 3
-At procedure 'ERR_1'
At trigger 'ERR_BI'
At procedure 'ERR_2'