Package constants#8916
Conversation
…rong impure cache usage
|
Are comments supported for constants? I didn't see this in the documentation. Comments are simply supported for packaged procedures and functions. It would make sense to do the same for constants (and any package objects, for that matter). |
No, I didn't plan to implement comments, but I think it's possible. I will take a look |
…onnect (FirebirdSQL#8992) * fix(udr): Add cleanup of UDR objects from `Engine` on attachment disconnect * Revert "fix(udr): Add cleanup of UDR objects from `Engine` on attachment disconnect" This reverts commit 80581c5. * fix(udr): Add cleanup of UDR objects from Engine on attachment disconnect --------- Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
|
@Noremos Please resolve the conflict. |
Done |
|
@asfernandes, thanks for the review. I'll resolve the issues tomorrow |
Co-authored-by: Adriano dos Santos Fernandes <529415+asfernandes@users.noreply.github.com>
|
@Noremos @asfernandes Do we have anything pending in this PR? |
I don't see any objections from @asfernandes to my fixes, so I think the pull request is ready to be accepted from my end. I can also provide the Firebird-QA tests that I used for testing. |
Package Constants
This PR adds a new database object - Package Constant (#1036). It is a constant value located in a package header (public visibility) or a package body (private visibility). See README.packages.txt for more information.
SYNTAX
Creation:
<constant_expr>is an expression that remains unchanged after recompilation.Package constants can be queried using the expression
<package_name>.<consatnt_name>outside the package (<consatnt_name> must be a public constant) and using the expression<consatnt_name>inside the package.To query a constant, the user/role must have USAGE permission on the package.
Other SQL extensions:
Usage examples:
System Constants
As an exmaple, 3 consatnts have been added to the RDB$BLOB_UTIL package
System metadata changes
New system table - RDB$CONSTANTS
A new field has been added to
RDB$PACKAGES-RDB$PACKAGE_IDNew indexes:
Implementation
Packages have been added to the metacaching system. Since it relies heavily on identifiers, a new ID field (
RDB$PACKAGE_ID) has been added to theRDB$PACKAGEStable. Constants are stored as an array in the package metacaching object, with a constant_name-to-array_id mapping.There are also two important points: