mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fix #7123 - ISQL does not extract "INCREMENT BY" for IDENTITY column.
This commit is contained in:
parent
7290d40d81
commit
b0c69b0d3f
@ -519,8 +519,24 @@ int EXTRACT_list_table(const SCHAR* relation_name,
|
||||
(RFR.RDB$IDENTITY_TYPE == IDENT_TYPE_BY_DEFAULT ? "BY DEFAULT" :
|
||||
RFR.RDB$IDENTITY_TYPE == IDENT_TYPE_ALWAYS ? "ALWAYS" : ""));
|
||||
|
||||
if (!GEN.RDB$INITIAL_VALUE.NULL && GEN.RDB$INITIAL_VALUE != 0)
|
||||
isqlGlob.printf(" (START WITH %" SQUADFORMAT ")", GEN.RDB$INITIAL_VALUE);
|
||||
const bool printInitial = !GEN.RDB$INITIAL_VALUE.NULL && GEN.RDB$INITIAL_VALUE != 0;
|
||||
const bool printIncrement = !GEN.RDB$GENERATOR_INCREMENT.NULL && GEN.RDB$GENERATOR_INCREMENT != 1;
|
||||
|
||||
if (printInitial || printIncrement)
|
||||
{
|
||||
isqlGlob.printf(" (");
|
||||
|
||||
if (printInitial)
|
||||
{
|
||||
isqlGlob.printf("START WITH %" SQUADFORMAT "%s",
|
||||
GEN.RDB$INITIAL_VALUE, (printIncrement ? " " : ""));
|
||||
}
|
||||
|
||||
if (printIncrement)
|
||||
isqlGlob.printf("INCREMENT %" SLONGFORMAT, GEN.RDB$GENERATOR_INCREMENT);
|
||||
|
||||
isqlGlob.printf(")");
|
||||
}
|
||||
}
|
||||
END_FOR
|
||||
ON_ERROR
|
||||
|
Loading…
Reference in New Issue
Block a user