text: CREATE FUNCTION tcl_max(integer, integer) RETURNS integer AS $$
      if {[argisnull 1]} {
          if {[argisnull 2]} { return_null }
          return $2
      }
      if {[argisnull 2]} { return $1 }
      if {$1 > $2} {return $1}
      return $2
  $$ LANGUAGE pltcl;
  