Skip to content
New issue

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

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

Already on GitHub? # to your account

Impossible to drop function in package with name of PSQL-function #7456

Closed
CyberMaxRu opened this issue Jan 23, 2023 · 0 comments
Closed

Impossible to drop function in package with name of PSQL-function #7456

CyberMaxRu opened this issue Jan 23, 2023 · 0 comments

Comments

@CyberMaxRu
Copy link

Firebird 4.0.2.2770.

  1. Create objects.

CREATE OR ALTER FUNCTION SOME_FUNC
RETURNS INTEGER
AS
BEGIN
RETURN 1;
END

SET TERM ^ ;

CREATE OR ALTER PACKAGE TEST_PKG
AS
BEGIN
FUNCTION SOME_FUNC() RETURNS INTEGER;-- Same name of real function, but in package
END^

RECREATE PACKAGE BODY TEST_PKG
AS
BEGIN
FUNCTION SOME_FUNC() RETURNS INTEGER
AS
BEGIN
END
END^

SET TERM ; ^

CREATE OR ALTER PROCEDURE TEST_PROC
AS
DECLARE VARIABLE NEW_INT INTEGER;
BEGIN
:NEW_INT = SOME_FUNC();
END

  1. Used PSQL-function, function in package no need, drop it:

CREATE OR ALTER PACKAGE TEST_PKG
AS
BEGIN
-- FUNCTION SOME_FUNC() RETURNS INTEGER;
END

Error:
This operation is not defined for system tables.
unsuccessful metadata update.
cannot delete.
Function SOME_FUNC.
there are 1 dependencies.

SQLCODE: -607
SQLSTATE: 38000
GDSCODE: 335544351

@asfernandes asfernandes self-assigned this Jan 23, 2023
asfernandes added a commit that referenced this issue Jan 23, 2023
@mrotteveel mrotteveel changed the title Impossible drop function in package with name of PSQL-function Impossible to drop function in package with name of PSQL-function Sep 21, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment