diff --git a/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSequence.java b/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSequence.java index dd583525626c..57c44bda1887 100644 --- a/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSequence.java +++ b/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSequence.java @@ -253,13 +253,29 @@ public String getObjectDefinitionText(DBRProgressMonitor monitor, Map 0) { + sql.append("\n\tINCREMENT BY ").append(info.getIncrementBy()); + } + if (info.getMinValue() > 0) { + sql.append("\n\tMINVALUE ").append(info.getMinValue()); + } else { + sql.append("\n\tNO MINVALUE"); + } + if (info.getMaxValue() > 0) { + sql.append("\n\tMAXVALUE ").append(info.getMaxValue()); + } else { + sql.append("\n\tNO MAXVALUE"); + } + if (info.getStartValue() > 0) { + sql.append("\n\tSTART ").append(info.getStartValue()); + } + if (info.getCacheValue() > 0) { + sql.append("\n\tCACHE ").append(info.getCacheValue()); + sql.append("\n\t").append(info.isCycled ? "" : "NO ").append("CYCLE"); + } + sql.append(';'); if (!CommonUtils.isEmpty(getDescription())) { sql.append("\nCOMMENT ON SEQUENCE ").append(DBUtils.getQuotedIdentifier(this)).append(" IS ")