- args:
    cascade: true
    sql: "CREATE FUNCTION search_jobs(search text)\r\nRETURNS SETOF jobs AS $$\r\n
      \   SELECT *\r\n    FROM jobs\r\n    WHERE\r\n      search <% (est_number  ||
      ' ' || ro_number  || ' ' || clm_no  || ' ' || ownr_ln  || ' ' || ownr_fn  ||
      ' ' || ownr_ph1 \r\n|| ' ' || ownr_ea \r\n|| ' ' || insd_ln \r\n|| ' ' || insd_fn
      \r\n|| ' ' || insd_ea \r\n|| ' ' || insd_ph1 )\r\n    ORDER BY\r\n      similarity(search,
      (est_number  || ' ' || ro_number  || ' ' || clm_no  || ' ' || ownr_ln  || '
      ' || ownr_fn  || ' ' || ownr_ph1 \r\n|| ' ' || ownr_ea \r\n|| ' ' || insd_ln
      \r\n|| ' ' || insd_fn \r\n|| ' ' || insd_ea \r\n|| ' ' || insd_ph1 )) DESC\r\n
      \   LIMIT 50;\r\n$$ LANGUAGE sql STABLE;"
  type: run_sql
- args:
    name: search_jobs
    schema: public
  type: track_function
