From 200720e39220194fe2f29347478008ab14255104 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Wed, 28 Nov 2018 10:52:54 -0200 Subject: [PATCH] Readme for CORE-5887 (Allow the use of management statements in PSQL blocks). --- .../README.management_statements_psql.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/sql.extensions/README.management_statements_psql.md diff --git a/doc/sql.extensions/README.management_statements_psql.md b/doc/sql.extensions/README.management_statements_psql.md new file mode 100644 index 0000000000..945d4230d8 --- /dev/null +++ b/doc/sql.extensions/README.management_statements_psql.md @@ -0,0 +1,30 @@ +# Management Statements in PSQL + +Before Firebird 4, management statements were not allowed inside PSQL blocks. They were allowed only as top-level SQL statements, or as top-level statement of an EXECUTE STATEMENT embedded in a PSQL block. + +Now they are allowed inside PSQL blocks (triggers, procedures, execute block) directly. + +As many applications depends that some management statements be issued on the connection start, ON CONNECT triggers is a good place to put them in this situation. + +The management statements part of this improvement are: +- ALTER SESSION RESET +- SET DECFLOAT ROUND +- SET DECFLOAT TRAPS TO +- SET DECFLOAT BIND +- SET ROLE +- SET SESSION IDLE TIMEOUT +- SET STATEMENT TIMEOUT +- SET TIME ZONE +- SET TIME ZONE BIND +- SET TRUSTED ROLE + +## Examples + +```sql +create or alter trigger on_connect on connect +as +begin + set decfloat bind double precision; + set time zone 'America/Sao_Paulo'; +end +```