-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Long-term solution for #2632 #8130
Conversation
What is a long-term solution for a bug already fixed 14 years ago? |
You didn't fix it. You merely workarounded it skipping unneeded assignments. This PR eliminates the assignments themselves. |
My solution fixed #2632:
Your "long-term solution" creates a bug:
|
How ever a NOT NULL output, without DEFAULT, unassigned parameter can become 0? |
Because user application (isql) assigned it to 0 in output buffer before call and called procedure never changed it. Much better question is why selectable stored procedure performs assign to output parameters if |
Let me remember your comment from there:
So what is a reason to validate values that are never assigned? |
This is no-sense, this is output parameter, not IN-OUT parameter. |
Procedure should return no rows, and isql perfectly handles such conditions. |
RAM cannot be "uninitialized". It always contain some value. And keep to contain it if no assignment was performed. Let me quote documentation:
|
Notice that it has been called with |
It's the first time I've heard that. Looks like your only opinion. |
Yes, missed it
Could you explain more ? |
Difference between selectable and executable stored procedures is not explicitly stated in creation statement but derived from existence of "suspend" inside. Executing of selectable procedure have defined behavior only if
|
I.e. it is defined and not a "gray zone".
Not agree. EXECUTE PROCEDURE always returns contents of its output params - this is defined behavior and not depends on presence of
If procedure contains no
Not related with current discussion. |
Yes, not directly related, I just come to this PR trying to eliminate EOS variable from If you consider the behavior of
|
For what ?
I see no issues in results above. |
To make
The same PSQL code producing different results. It is not an issue for you? |
The confusion (for me) is because AFAIR in first version (before final release) of EXECUTE BLOCK, the behavior was like procedures. If there were no SUSPEND, it was going to return one row. |
I really don't remember it ;) |
Wasn't it only described as "select" that time? |
Still not clear.
No. There is rule and it is well defined. |
I expect it to solve #8082 and improve performance at once.
It is an internal rule. And too inconsistent IMHO. Besides, documentation disagree:
|
Current workaround should be preserved because of stored BLR in old databases.