List<Sql> commands = new ArrayList<Sql>(Arrays.asList(super.generateSql(statement, database, sqlGeneratorChain)));
// for postgres, we need to also set the sequence to be owned by this table for true serial like functionality.
// this will allow a drop table cascade to remove the sequence as well.
SequenceNextValueFunction sequenceFunction = (SequenceNextValueFunction) statement.getDefaultValue();
Sql alterSequenceOwner = new UnparsedSql("ALTER SEQUENCE " + database.escapeSequenceName(statement.getCatalogName(),
statement.getSchemaName(), sequenceFunction.getValue()) + " OWNED BY " +
database.escapeTableName(statement.getCatalogName(), statement.getSchemaName(), statement.getTableName()) + "."
+ database.escapeObjectName(statement.getColumnName(), Column.class),
getAffectedColumn(statement),
getAffectedSequence(sequenceFunction));