def pg_varchar(size=0):
 if size:
  if (not isinstance(size, int)):
   raise ValueError(('VARCHAR parameter should be an int, got %s' % type(size)))
  if (size > 0):
   return ('VARCHAR(%d)' % size)
 return 'VARCHAR'

def pg_varchar ( size = 0 ) : if size : if ( not isinstance ( size , int ) ) : raise ValueError ( ( 'VARCHAR parameter should be an int, got %s' % type ( size ) ) ) if ( size > 0 ) : return ( 'VARCHAR(%d)' % size ) return 'VARCHAR'
returns the varchar declaration for the provided size: * if no size return an infinite varchar * otherwise return a varchar(n) :type int size: varchar size .