class AddDefaultValueGeneratorPostgres extends AddDefaultValueGenerator {

    @Override
    public int getPriority() {
        return PRIORITY_DATABASE;
    }

    @Override
    public boolean supports(AddDefaultValueStatement statement, Database database) {
        return database instanceof PostgresDatabase;
    }

    @Override
    public Sql[] generateSql(final AddDefaultValueStatement statement, final Database database,
                             final SqlGeneratorChain sqlGeneratorChain) {<FILL_FUNCTION_BODY>}

    protected Sequence getAffectedSequence(SequenceNextValueFunction sequenceFunction) {
        return new Sequence().setName(sequenceFunction.getValue());
    }
}


        if (!(statement.getDefaultValue() instanceof SequenceNextValueFunction)) {
            return super.generateSql(statement, database, sqlGeneratorChain);
        }

        List<Sql> commands = new ArrayList<>(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();

        String sequenceName = sequenceFunction.getValue();
        String sequenceSchemaName = sequenceFunction.getSchemaName();
        String sequence = database.escapeObjectName(null, sequenceSchemaName, sequenceName, Sequence.class);


        Sql alterSequenceOwner = new UnparsedSql("ALTER SEQUENCE " + sequence + " OWNED BY " +
                database.escapeTableName(statement.getCatalogName(), statement.getSchemaName(), statement.getTableName()) + "."
                + database.escapeObjectName(statement.getColumnName(), Column.class),
                getAffectedColumn(statement),
                getAffectedSequence(sequenceFunction));
        commands.add(alterSequenceOwner);
        return commands.toArray(EMPTY_SQL);
    
<methods>public non-sealed void <init>() ,public liquibase.sql.Sql[] generateSql(liquibase.statement.core.AddDefaultValueStatement, liquibase.database.Database, SqlGeneratorChain#RAW) ,public liquibase.exception.ValidationErrors validate(liquibase.statement.core.AddDefaultValueStatement, liquibase.database.Database, SqlGeneratorChain#RAW) ,public liquibase.exception.Warnings warn(liquibase.statement.core.AddDefaultValueStatement, liquibase.database.Database, SqlGeneratorChain#RAW) <variables>