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 "Rick Hillegas (JIRA)" <ji...@apache.org> on 2010/03/25 20:43:27 UTC

[jira] Commented: (DERBY-4568) Documentation needed for sequence generators

    [ https://issues.apache.org/jira/browse/DERBY-4568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849869#action_12849869 ] 

Rick Hillegas commented on DERBY-4568:
--------------------------------------

Hi Kim. Thanks for this great documentation. I have some comments, largely related to mistakes in the spec, for which I apologize:

rrefsistabssysperms

o I apologize. The spec says that some of the column names have underscores in them. That is not true. There are no underscores in the names of these columns.

o Redundant "the" in the first sentence.

o For GRANTEE/GRANTOR/ISGRANTABLE, I think it would be better to just copy the verbiage from the GRANTEE/GRANTOR/GRANTABLE columns of SYSCOLPERMS and SYSROUTINEPERMS.


rrefsistabssyssequences

o I apologize. The spec says that some of the column names have underscores in them. That is not true. There are no underscores in the names of these columns.

o SEQUENCEDATATYPE - For this row, I would just copy the verbiage from SYSCOLUMNS.COLUMNDATATYPE.

o CURRENTVALUE - I apologize for another error in the spec. The initial value of this column is STARTVALUE. This column is NULL only if the sequence generator is exhausted and cannot issue any more numbers.


rrefsqljcreatesequence

o I apologize again. The grammar in the spec is too restrictive. The actual grammar is:

CREATE SEQUENCE sequenceName [ SequenceElement ] *

SequenceElement

{
  AS dataType
 | START WITH signedInteger
 | INCREMENT BY signedInteger
 | MAXVALUE signedInteger | NO MAXVALUE
 | MINVALUE signedInteger | NO MINVALUE
 | CYCLE | NO CYCLE
}

o Examples - It's a little unclear what is the last value of these generators. The last legal value of the first generator is the largest possible INT. The last legal value of the second generator is the largest possible BIGINT. After handing out the largest value, Derby raises an exception if NEXT VALUE is invoked on the generator again.


rrefsqljnextvaluefor

o Again, I apologize for errors in the spec. I would reword the description of NEXT VALUE as follows:

"If this is the first use of the sequence generator, then the generator returns its STARTVALUE. Otherwise, the INCREMENT value is added to the previous value returned by the sequence generator..."

o Thanks for asking that question about WINDOW functions. Yes, that limitation should be "WINDOW function".


> Documentation needed for sequence generators
> --------------------------------------------
>
>                 Key: DERBY-4568
>                 URL: https://issues.apache.org/jira/browse/DERBY-4568
>             Project: Derby
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>         Attachments: DERBY-4568.diff, DERBY-4568.stat, DERBY-4568.zip
>
>
> DERBY-712 provides support for sequence generators, which now need to be documented.

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