Skip to content

Instantly share code, notes, and snippets.

@longkey1
Last active December 15, 2015 16:39
Show Gist options
  • Save longkey1/5290393 to your computer and use it in GitHub Desktop.
Save longkey1/5290393 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION to_tsquery_ungm(text) RETURNS tsquery AS $$
select to_tsquery(array_to_string(regexp_split_to_array($1, E'\\s*'),'&'));
$$ language sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment