class PostgreSQLRowDescriptionPacket implements PostgreSQLPacket {

    @Override
    public void write(final PostgreSQLPacketPayload payload) {
        payload.writeInt2(fieldCount);
        for (PostgreSQLColumnDescription each : columnDescriptions) {
            payload.writeStringNul(each.getColumnName());
            payload.writeInt4(each.getTableOID());
            payload.writeInt2(each.getColumnIndex());
            payload.writeInt4(each.getTypeOID());
            payload.writeInt2(each.getColumnLength());
            payload.writeInt4(each.getTypeModifier());
            payload.writeInt2(each.getDataFormat());
        }
    }

}