You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bryan Pendleton (JIRA)" <de...@db.apache.org> on 2006/10/08 20:15:20 UTC

[jira] Commented: (DERBY-183) Parameter names required in CREATE FUNCTION

    [ http://issues.apache.org/jira/browse/DERBY-183?page=comments#action_12440771 ] 
            
Bryan Pendleton commented on DERBY-183:
---------------------------------------

Hello James, thanks for looking at this problem, and thanks for the patch!

It would be nice if the patch included some test cases, both to syntactically
demonstrate the handling of various combinations of named and unnamed parameters,
and to demonstrate the correct execution of such functions.

Also, could you expand upon the meaning of  "LOOKAHEAD(2)" in the parser change?
I'm not that familiar with the way that LOOKAHEAD functions, so was confused as to
why it was added here. Perhaps you could add some comments in the code itself to
explain the usage of LOOKAHEAD(2). I assume that it effectively makes the parameter
name be optional; how does that technique compare to, say, having two alternate
productions in functionParameterDefinition(), one with a parameter name and one without?



> Parameter names required in CREATE FUNCTION
> -------------------------------------------
>
>                 Key: DERBY-183
>                 URL: http://issues.apache.org/jira/browse/DERBY-183
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0
>            Reporter: Jack Klebanoff
>         Assigned To: James F. Adams
>            Priority: Minor
>         Attachments: Derby183.patch.txt
>
>
> A statement like
>   create function s2.f2( char(8), integer) returns int
>   language java parameter style java  external name 'myclass.mymethod'
> fails with the message
>   ERROR 42X01: Syntax error: Encountered "char" at line 1, column 24
> However
>   create function s2.f2( p1 char(8), p2 integer) returns int
>   language java parameter style java  external name 'myclass.mymethod'
> is accepted.
> The Derby documentation (at http://incubator.apache.org/derby/manuals/reference/sqlj27.html#CREATE+PROCEDURE+Statement), the SQL2003 standard, and DB2 all agree that the parameter name is optional.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira