Skip to content

procedure returns different result when directly executed on DB server vs debugged through debugger(pgAdmin/PEM) #8007

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

Closed
hargudekishor opened this issue Oct 4, 2024 · 1 comment
Assignees
Milestone

Comments

@hargudekishor
Copy link

Procedure code :


-- Package: public.empinfo

-- DROP PACKAGE public.empinfo;

CREATE OR REPLACE PACKAGE public.empinfo
IS
  mv_num numeric(4,0);
  PROCEDURE p_execute(jigyosyocode character(8));   -- OR  PROCEDURE p_execute(jigyosyocode character); 
END empinfo;

CREATE OR REPLACE PACKAGE BODY public.empinfo
IS
    
    PROCEDURE p_execute(jigyosyocode character(8))  -- OR  PROCEDURE p_execute(jigyosyocode character); 
    IS 

BEGIN


mv_num := 1000;


RAISE INFO    'テスト';


-- COMMIT;

EXCEPTION
WHEN OTHERS THEN

ROLLBACK;

-- 例外を再スロー
RAISE;

END p_execute;

END empinfo;

When p_execute directly executed on DB server then result is as below :

edb=# select * from empinfo.p_Execute('kishor');
INFO:  テスト
INFO:  kishor
 p_execute 
-----------
 
(1 row)

edb=# 

When p_execute executed (empinfo.p_Execute(‘kishor’)) using debugger (pgAdmin/PEM) result is as below :

INFO:  テスト
INFO:  k

EDB-SPL Procedure successfully completed

Based on the above example, Its appears that, when the procedure is directly executed on DB server it accpets any length of value in parameter jigyosyocode (with datatype character(8) or character ). However, when the procedure is attached to the debugger (in PEM/PgADMin) then parameter jigyosyocode(with datatype character(8) or character) accepts only a single character.

So the behavior of the datatype character when used with procedure arguments looks incorrect when procedure is executed with debugger.

Thank you.

@akshay-joshi akshay-joshi moved this to 🆕 New in Current Sprint (192) Oct 4, 2024
@akshay-joshi akshay-joshi added this to the 8.13 milestone Oct 4, 2024
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Oct 10, 2024
akshay-joshi pushed a commit that referenced this issue Oct 10, 2024
@RohitBhati8269 RohitBhati8269 self-assigned this Oct 14, 2024
@RohitBhati8269
Copy link
Contributor

Issue fixed, verified on latest snapshot build.

Env:
OS - macOS 14.1 (Sonoma)
Mode - Desktop

@RohitBhati8269 RohitBhati8269 moved this from In Testing to ✅ Done in Current Sprint (192) Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants