- args:
    cascade: true
    sql: "CREATE FUNCTION search_owners(search text)\r\nRETURNS SETOF owners AS $$\r\n
      \   SELECT *\r\n    FROM owners\r\n    WHERE\r\n      search <% (ownr_fn  ||
      ' ' || ownr_ln  || ' ' || ownr_addr1  || ' ' || ownr_city  || ' ' || ownr_zip
      \ || ' ' || ownr_ea || ' ' || ownr_ph1 || ' ' || ownr_ph2)\r\n    ORDER BY\r\n
      \     similarity(search, (ownr_fn  || ' ' || ownr_ln  || ' ' || ownr_addr1  ||
      ' ' || ownr_city  || ' ' || ownr_zip  || ' ' || ownr_ea || ' ' || ownr_ph1 ||
      ' ' || ownr_ph2)) DESC\r\n    LIMIT 20;\r\n$$ LANGUAGE sql STABLE;"
  type: run_sql
- args:
    name: search_owners
    schema: public
  type: track_function
