Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25352] Add a user schema to your stored procedures for consistency with other objects. #5205

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

jongmin-won
Copy link
Contributor

http:https://jira.cubrid.org/browse/CBRD-25352http:https://jira.cubrid.org/browse/CBRD-25352

Purpose
We will implement a feature to create a User Schema in Java Stored Procedure to ensure consistency with other objects such as tables, triggers, serial, servers, and synonyms.

Implementation
TO-DO

Remarks
AS-IS

  • Procedures and functions can be used by other users, independent of the owner.

CALL login ('test_user1', '') ON CLASS db_user;
CREATE FUNCTION function_hello() RETURN STRING AS LANGUAGE JAVA NAME 'SpCubrid.HelloCubrid() return java.lang.String';

CALL login ('dba', '') ON CLASS db_user;
SELECT function_hello() FROM db_root;

TO-BE

  • When a user other than the owner uses a procedure or function, they must specify the owner_name.

CALL login ('test_user1', '') ON CLASS db_user;
CREATE FUNCTION function_hello() RETURN STRING AS LANGUAGE JAVA NAME 'SpCubrid.HelloCubrid() return java.lang.String';

CALL login ('dba', '') ON CLASS db_user;
SELECT test_user1.function_hello() FROM db_root;

…procedure_args system catalog table, 2) Add [user_schema].[sp_name] to the unique_name column when creating a procedure/function, 3) Core File created (need to check) - When the createdb utility is executed - After creating the first procedure/function, when creating another new one
@jongmin-won jongmin-won self-assigned this May 17, 2024
jongmin-won added 8 commits May 17, 2024 15:51
…user is the same as the current user, the resolved_name of the PT_NAME node is stored as an empty value. Therefore, we add an else condition to the au_set_user() function. 2)When executing the ALTER PROCEDURE/FUNCTION ... OWNER TO statement, the [user_schema] part of the [unique_name] column is modified.
…tored_procedure and _db_stored_procedure_args) * Currently, the CUBRID specification does not store [unique_name] in system catalog view table.
…_procedure_args catalog table from Primary Key index to General index, 3) When using the Createdb utility, the part saved as '.[sp_name]' will be analyzed by creating another issue. (authenticate.c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant