#NEWLINE# def parse_pg_version( self , data ) : #NEWLINE# #INDENT# m = re . match ( '\\S+\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?' , data ) #NEWLINE# if ( m is None ) : #NEWLINE# #INDENT# raise PgxnClientException ( ( "cannot parse version number from '%s'" % data ) ) #NEWLINE# #UNINDENT# return ( int ( m . group ( 1 ) ) , int ( m . group ( 2 ) ) , int ( ( m . group ( 3 ) or 0 ) ) )