Let non-null integer type columns be convertible to IDENTITY
------------------------------------------------------------

                 Key: CORE-5402
                 URL: http://tracker.firebirdsql.org/browse/CORE-5402
             Project: Firebird Core
          Issue Type: Improvement
    Affects Versions: 3.0.1, 4.0 Initial
         Environment: Any
            Reporter: Helen Borrie
            Priority: Minor


Is it a trivial change to enable conversion of an integer type column that is 
populated from a generator from a trigger to IDENTITY type?
Example
------------
create generator id_gen_idtest;
create table idtest (id integer not null, data varchar(10);
commit;
set term ^;
create trigger get_id_idtest  for idtest 
active before insert as
begin
  if (new.id is null) then new.id = next value for id_gen;
end ^
set term ;^
commit;
insert into idtest (data) values ('first');
insert into idtest (data) values ('second');
insert into idtest (data) values ('third');
insert into idtest (data) values ('fourth');
commit;

Make this possible without the need to remove dependencies:

alter table idtest 
alter column id type integer generated by default as IDENTITY (start with 5);
-- not forgetting to
drop trigger get_id_idtest;
commit; 




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

        

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to