db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1918) INCREMENT of IDENTITY column described as allowing a value of zero in reference manual
Date Wed, 04 Oct 2006 16:35:21 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1918?page=comments#action_12439890 ] 
            
Dag H. Wanvik commented on DERBY-1918:
--------------------------------------

This refman section also contains a somewhat mystifying reference to
ConnectionInfo, which seems to be a carry-over from the way things
were done in Cloudscape prior to the existence of IDENTITY_LOCAL_VAL:

> When an insert happens within a triggered-SQL-statement, the value
> inserted by the triggered-SQL-statement into the identity column is
> available from ConnectionInfo only within the trigger code....
                               *************

What is the status of ConnectionInfo? It seems to have been part of
the public API at one time?  This is the only place ConnectionInfo is
ever mentioned in the docs as far as I can see.. 

The paragraph should probably be reworded or removed. I'll file a new issue if
people agree.


> INCREMENT of IDENTITY column described as allowing a value of zero in reference manual
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-1918
>                 URL: http://issues.apache.org/jira/browse/DERBY-1918
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.2.1.6, 10.3.0.0, 10.1.3.1, 10.2.2.0
>            Reporter: Dag H. Wanvik
>         Assigned To: Dag H. Wanvik
>            Priority: Trivial
>             Fix For: 10.3.0.0
>
>         Attachments: derby1918.diff, derby1918.stat
>
>
> In the description of how INCREMENT work with IDENTITY columns, th
> reference manual is out of step with the implementation in the following respect
> (quote from http://db.apache.org/derby/docs/10.2/ref/rrefsqlj37836.html):
> > By default, the initial value of an identity column is 1, and the
> > amount of the increment is 1. You can specify non-default values for
> > both the initial value and the interval amount when you define the
> > column with the key words STARTS WITH and INCREMENT BY. And if you
> > specify a negative number for the increment value, Derby decrements
> > the value with each insert. If this value is 0, or positive, Derby
>                                                     ******************
> > increments the value with each insert.
> In fact, the implementation does not allow a value of zero, but gives
> error 42Z21 (LANG_AI_INVALID_INCREMENT):
> ij> create table f (i int generated by default as identity (start with 1, increment
by 0), j int);
> ERROR 42Z21: Invalid increment specified for identity for column 'I'. Increment cannot
be zero.  

-- 
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

        

Mime
View raw message