(pkt)
return (columns, data)
Parse a query response
Parse a query response
Parse a query response
def parse_response(pkt):
    """Parse a query response"""
    data = []

    try:
        (columns, pkt) = get_columns(pkt)
        while True:
            if is_done(pkt):
                break

            dlen = endian_int(pkt[1:5]) + 1
            row = get_row(pkt[5:dlen])
            data.append(row)
            pkt = pkt[dlen:]
    except Exception, e:
        util.debug('Error parsing postgres: %s' % e)
    return (columns, data)
def parse_response ( pkt ) : data = [ ] try : ( columns , pkt ) = get_columns ( pkt ) while True : if is_done ( pkt ) : break dlen = endian_int ( pkt [ 1 : 5 ] ) + 1 row = get_row ( pkt [ 5 : dlen ] ) data . append ( row ) pkt = pkt [ dlen : ] except Exception , e : util . debug ( 'Error parsing postgres: %s' % e ) return ( columns , data )