Skip to content

Instantly share code, notes, and snippets.

@kmikael
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmikael/7087e16e59cd32d97d21 to your computer and use it in GitHub Desktop.
Save kmikael/7087e16e59cd32d97d21 to your computer and use it in GitHub Desktop.
PostgreSQL Parsers
SELECT t.alias, p.token
FROM ts_parse('default', 'http://www.postgresql.org/docs/9.4/static/textsearch-parsers.html') AS p
NATURAL JOIN ts_token_type('default') AS t;
-- alias | token
-- ----------+------------------------------------------------------------
-- protocol | http://
-- url | www.postgresql.org/docs/9.4/static/textsearch-parsers.html
-- host | www.postgresql.org
-- url_path | /docs/9.4/static/textsearch-parsers.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment