db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3610) Confusing error message when granting execute privilege
Date Wed, 01 Apr 2009 23:31:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694825#action_12694825

Dag H. Wanvik commented on DERBY-3610:

Thanks for looking at this issue, Hiranya.

You could make one new error message which can take an argument, "procedure" or "function",
and use that
in the PrivilegeNode as the case may be. Note that arguments to error messages need to be
localized (i18n), but in this case the variability would be SQL keywords, so it's ok to use
them as is. As for code assignment, 
it is a bit messy already, but we should try to look at:

a) SQL standard codes if prescribed in the standard, cf. Foundation(part 2), section 24.1
    (drafts can be found here: http://www.wiscorp.com/SQLStandards.html)
b) Derby established practice, cf. the comment headers in  reference/SQLState.java

Is probably wise to avoid codes that have been used in the past (i.e. are commented out).
In this case I think it would be good to put it close to the existing one, e.g. 42Y21 is unused.

> Confusing error message when granting execute privilege
> -------------------------------------------------------
>                 Key: DERBY-3610
>                 URL: https://issues.apache.org/jira/browse/DERBY-3610
>             Project: Derby
>          Issue Type: Improvement
>          Components: Newcomer, SQL
>            Reporter: Dag H. Wanvik
>            Priority: Trivial
> When the wrong keyword is used in a grant execute privilege statement, the error message
> leads one the believe the identifier is neither a procedure or a function, when in deed
it is one of the two.
> > create function bc(i int) returns int language java parameter style java external
name 'java.lang.Integer.bitCount' no sql;
> > grant execute on procedure bc to foo;
> ERROR 42Y03: 'BC' is not recognized as a function or procedure.
> > grant execute on function bc to foo;
> (works)
> The reason is that the error message is generic. It would be better to have an error
message for each case.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message