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

Default values for procedure [CORE1976] #2414

Closed
firebird-automations opened this issue Jul 4, 2008 · 3 comments
Closed

Default values for procedure [CORE1976] #2414

firebird-automations opened this issue Jul 4, 2008 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Alexander Tyutik (tut)

I have many procedures with many parameters with default values. It would be nice to have ability to omit any default parameter, not only last.
I have 2 solutions:

CREATE PROCEDURE PROC (
PARAM_A INTEGER,
PARAM_B INTEGER = 2,
PARAM_C INTEGER = 3
) ...

1) Use empty parameters or DEFAULT keyword:

SELECT * FROM PROC(1, , 5) or SELECT * FROM PROC(1, DEFAULT, 5)

2) Use named parameters (always in the end of list):

SELECT * FROM PROC(1, ?PARAM_C = 5) or SELECT * FROM PROC(?PARAM_A = 1, ?PARAM_C = 5)

@firebird-automations
Copy link
Collaborator Author

Modified by: Alexander Tyutik (tut)

description: I have many procedures with many parameters with default values. It would be nice to have ability to omit any default parameter, not only last.
I have 2 solutions:

CREATE PROCEDURE PROC (
PARAM_A INTEGER,
PARAM_B INTEGER = 2,
PARAM_C INTEGER = 3
) ...

1) Use empty parameters or DEFAULT keyword:

SELECT * FROM PROC(1, , 5) or SELECT * FROM PROC(1, DEFAULT, 5)

2) Use named parameters (always in the end of list):
SELECT * FROM PROC(1, ?PARAM_C = 5) or SELECT * FROM PROC(?PARAM_A = 1, ?PARAM_C = 5)

=>

I have many procedures with many parameters with default values. It would be nice to have ability to omit any default parameter, not only last.
I have 2 solutions:

CREATE PROCEDURE PROC (
PARAM_A INTEGER,
PARAM_B INTEGER = 2,
PARAM_C INTEGER = 3
) ...

1) Use empty parameters or DEFAULT keyword:

SELECT * FROM PROC(1, , 5) or SELECT * FROM PROC(1, DEFAULT, 5)

2) Use named parameters (always in the end of list):

SELECT * FROM PROC(1, ?PARAM_C = 5) or SELECT * FROM PROC(?PARAM_A = 1, ?PARAM_C = 5)

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Component: Engine [ 10000 ]

@dyemanov
Copy link
Member

AFAIU, this is now superseded by #7566 and #7586 and thus can be closed.

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

2 participants