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

Calling function without requirement of substitution of the return value to the variable [CORE5961] #6215

Closed
firebird-automations opened this issue Nov 11, 2018 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Tomasz Kujalow (tkujalow)

It would be good possibility to use functions from packages without requirement of
substitution of the returned value to the variable.

Now I have to call function in this way:

declare variable x integer;
x=pack_name.no_ret_fnc(1);

But sometimes I don't need return value and I want call this function:

pack_name.no_ret_fnc(1);

For example I want to have some functions to insert data to temporary table:

CREATE OR ALTER PACKAGE PACK_NAME
AS
begin

function NO_RET_FUNC (
VALUE_IN integer
)
returns integer
as
begin
insert into tmp_tab(value)
values(:value_in);
return -1;
end
end

Is any chance to add such possibility?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

We allowed that for UDFs in the past, so I believe this should be doable for PSQL functions too.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

I just tried and this works :

CREATE PACKAGE PACK_NAME
AS
begin
function NO_RET_FUNC ( VALUE_IN integer ) returns integer;
end

CREATE PACKAGE BODY PACK_NAME
AS
begin
function NO_RET_FUNC ( VALUE_IN integer ) returns integer
as
begin
return :value_in * -1;
end
end

execute block
as
begin
PACK_NAME.NO_RET_FUNC(1);
end

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Tomasz Kujalow (tkujalow)

Thank you.
It was IbExpert bug.
After upgrade from ver. 2018.10.28 to ver. 2018.11.13 this functionality works.

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

1 participant