@Override
public PostgresStatement finishGenerating(PostgresServerSession server,
String sql, StatementNode stmt,
List<ParameterNode> params, int[] paramTypes) {
PrepareStatementNode prepare = (PrepareStatementNode)stmt;
this.name = prepare.getName();
this.stmt = prepare.getStatement();
if (params == null)
params = new ParameterFinder().find(this.stmt);
this.params = params;
this.paramTypes = paramTypes;
this.sql = sql.substring(this.stmt.getBeginOffset(), this.stmt.getEndOffset() + 1);