Adriano dos Santos Fernandes 16a7f49e7f Correction 1 месяц назад
..
README.PSQL_stack_trace.txt 8cf8a6b00b Correctly written my name and e-mail 17 лет назад
README.aggregate_filter.md 8af76dd576 Syntax correction FILTER 7 лет назад
README.aggregate_functions.md ebc2632698 Add support bitwise aggregate functions (#8768) 3 месяцев назад
README.aggregate_tracking 70ac4f226c Please give some comments 22 лет назад
README.alternate_string_quoting.txt ed0e0daeb3 - External Engines implementation. 16 лет назад
README.autonomous_transactions.txt 9ac2238c3d Merge branch 'query_restarts_2' 5 лет назад
README.blob_append.md 213bc1c2b8 Front-copied BLOB_APPEND readme to master 3 лет назад
README.blob_util.md 73c1ab807a RDB$BLOB_UTIL system package. (#281) 3 лет назад
README.builtin_functions.txt 5afe69d4f0 misc: fix spelling (#8577) 8 месяцев назад
README.call.md b6248f6453 Feature #7587 - CALL statement. 2 лет назад
README.case 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.cast.format.md 970621b2be Fix error in cast format example 6 месяцев назад
README.coalesce 56892f3fb0 update readme's with method used for determing result data type 21 лет назад
README.column_type_psql.txt 887206e65b The merge is being fixed. 18 лет назад
README.common_table_expressions 77498cac9b Fixed some warnings 17 лет назад
README.context_variables cd8b6e0a41 Reworked syntax for new error context vars, based on feedback from the other devs. 9 лет назад
README.context_variables2 e0662447cf misc: fix spelling (#8495) 10 месяцев назад
README.cumulative_roles.txt 61b4bf0d27 Fixed CORE-5593: System function RDB$ROLE_IN_USE cannot take long role names with lower-case letters 7 лет назад
README.current_time d094341e79 Typo. 20 лет назад
README.cursor_variables.txt 0478d4fffa Fixed CORE-4488 - Wrong results of FOR SELECT <L> FROM <T> AS CURSOR <C> and table <T> is modified inside cursor's begin...end block. 11 лет назад
README.cursors d7b5b1acde Documentation for CORE-4403 - Allow referencing cursors as record variables in PSQL. 11 лет назад
README.data_type_results_of_aggregations.txt 7fd8985732 Corrections. 19 лет назад
README.data_types 422035f291 Documentation 5 лет назад
README.db_triggers.txt 1c4d0a2629 Misc. 18 лет назад
README.ddl.txt cea9f33e96 Feature #1113 - Add support for SQL Schemas. 10 месяцев назад
README.ddl_access.txt 8423748c2b Correct description 9 лет назад
README.ddl_triggers.txt 76651e224b Document MAPPING as valid DDL triggers type. 6 месяцев назад
README.declare_var_initializer.md a71ec888e4 Improvement #7590 - Improve DECLARE VARIABLE to accept complete value expressions. (#7608) 2 лет назад
README.default_parameters ee5a856d4a misc: fix spelling (#8578) 8 месяцев назад
README.derived_tables.txt ef565b1832 Documentation 5 лет назад
README.distinct a77d9e3a79 More docs. 21 лет назад
README.domains_psql.txt 887206e65b The merge is being fixed. 18 лет назад
README.exception_handling ebd0d3c813 More context variables for error handlers, see CORE-1132 and CORE-2040. (#46) 9 лет назад
README.execute_block 8cf8a6b00b Correctly written my name and e-mail 17 лет назад
README.execute_statement b43ad7ae16 Misc, adding example. 19 лет назад
README.execute_statement2 c263c3d345 Fix spelling (#8479) 10 месяцев назад
README.explicit_locks 5afe69d4f0 misc: fix spelling (#8577) 8 месяцев назад
README.expression_indices 77498cac9b Fixed some warnings 17 лет назад
README.external_connections_pool 94d3a7cfe8 Let external transaction run with CONCURRENCY isolation mode if local transaction runs with READ COMMITED READ CONSISTENCY isolation and such isolation mode is not supported by external data source. 6 лет назад
README.floating_point_types.md 426aeb50c8 CORE-6109 SQL standard FLOAT type syntax support (#218) 6 лет назад
README.generate_series.md f0ac23e222 GENERATE_SERIES function (#8795) 2 месяцев назад
README.global_temporary_tables 7ce2a344f0 Fixed bug CORE-6043 : GTTs do not release used space 6 лет назад
README.hex_literals.txt 2ca31bf7d1 Update readme for #5588. 4 лет назад
README.identity_columns.txt 5afe69d4f0 misc: fix spelling (#8577) 8 месяцев назад
README.iif dc04b6d07c More docs. 21 лет назад
README.joins.txt fd33f237d2 Doc. for new join types 19 лет назад
README.keywords 9d191e82c0 GREATEST and LEAST (SQL:2023 - T054) (#8532) 9 месяцев назад
README.leave_labels d44367f80b Added some docs. 21 лет назад
README.length 59213efe7e Merge INTL branch into HEAD 20 лет назад
README.linger 120b10a78a Implemented CORE-4263: Database linger 12 лет назад
README.list 620d0550d0 Updated LIST documentation - thanks to Maycon Ferraça 19 лет назад
README.listagg 16a7f49e7f Correction 1 месяц назад
README.management_statements_psql.md a6b05a671e Started with doc for a feature 6 лет назад
README.mapping.html 928242e54d Misc docs 5 лет назад
README.merge.txt 854b809c77 Feature #6681 and fix for #6942. 4 лет назад
README.name_resolution.md 067b26d4b8 Feature #8439 - Syntax rules for ambiguous name resolution. 10 месяцев назад
README.named_arguments.md 00a50429cb Feature #7566 - Allow DEFAULT keyword in argument list. 2 лет назад
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.offset_fetch.txt 155508d05e CORE-4526 Support for SQL:2008 OFFSET and FETCH clauses 11 лет назад
README.order_by_expressions_nulls 1c5c4e0feb Corrections for v2.0 and above. 18 лет назад
README.packages.txt 52657ab691 Add `ALTER PACKAGE BODY` and `CRETE OR ALTER PACKAGE BODY` parse rules (#8309) 1 год назад
README.partial_indices f3269d144d Added the docs 3 лет назад
README.plan 607816519d Minor fixes. 21 лет назад
README.profiler.md cea9f33e96 Feature #1113 - Add support for SQL Schemas. 10 месяцев назад
README.range_based_for.md 675246bf24 Some rephrasing of rang-based for docs 4 месяцев назад
README.regr_functions.txt f412800202 Cleanup: get rid of unused variables. 4 лет назад
README.returning b32f96f2a9 Feature #6815 - Support multiple rows for DML RETURNING. 4 лет назад
README.rows 155508d05e CORE-4526 Support for SQL:2008 OFFSET and FETCH clauses 11 лет назад
README.savepoints 9f6ac0a96f Added docs for savepoints 22 лет назад
README.schemas.md 5aa1a39dc3 Fix wrong placement of SCHEMA in syntax 5 месяцев назад
README.scrollable_cursors.txt 64fa369e3d misc: fix spelling (#8575) 8 месяцев назад
README.select_expressions 43e6fc05c8 Corrections, thanks to Claudio. 20 лет назад
README.sequence_generators 607816519d Minor fixes. 21 лет назад
README.set_bind.md 23906efcff Fixed CORE-6303: Error writing to TIMESTAMP/TIME WITH TIME ZONE array 5 лет назад
README.set_role c0f587457b Added doc 11 лет назад
README.set_transaction.txt babd741daa Add AUTO RELEASE TEMP BLOBID transaction option (#8323) 1 год назад
README.similar_to.txt 0e934bd662 SIMILAR TO also requires escape of } 4 лет назад
README.skip_locked.md 69f8afd178 Fixed DELETE RETURNING handling, update documentation for SKIP LOCKED. 2 лет назад
README.sql_package.md 5ece0eb719 Text fix 6 месяцев назад
README.sql_security.txt ee5a856d4a misc: fix spelling (#8578) 8 месяцев назад
README.statistical_functions.txt 64d146a06f Feature CORE-4717 - Aggregate statistical functions COVAR_SAMP, COVAR_POP and CORR - contributed by Hajime Nakagami. 11 лет назад
README.subroutines.txt 3c22c23874 Improvement #4769 - Allow sub-routines to access variables/parameters 4 лет назад
README.substring_similar.txt 6e685c3f82 Fix syntax error in substring-similar doc 4 лет назад
README.time_zone.md c4143b413b Replaced various old and/or HTTP URLs in documentation and installers 6 месяцев назад
README.trim 56e8c6224c Add multi-character TRIM function (#8015) 1 год назад
README.universal_triggers 4ec2700475 Fixed typos. 20 лет назад
README.unlist f00a24c12f New 'UNLIST' function (#8418) 10 месяцев назад
README.update_or_insert b32f96f2a9 Feature #6815 - Support multiple rows for DML RETURNING. 4 лет назад
README.user_management 1e37604cd0 Implemented CORE-6279: Put options in user management statements in any order 5 лет назад
README.view_updates fe5aa5e822 Placeholders for further docs. 21 лет назад
README.window_functions.md 64fa369e3d misc: fix spelling (#8575) 8 месяцев назад

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 Khorsun

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'