~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to contrib/test_parser/sql/test_parser.sql

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CREATE EXTENSION test_parser;
 
2
 
 
3
-- make test configuration using parser
 
4
 
 
5
CREATE TEXT SEARCH CONFIGURATION testcfg (PARSER = testparser);
 
6
 
 
7
ALTER TEXT SEARCH CONFIGURATION testcfg ADD MAPPING FOR word WITH simple;
 
8
 
 
9
-- ts_parse
 
10
 
 
11
SELECT * FROM ts_parse('testparser', 'That''s simple parser can''t parse urls like http://some.url/here/');
 
12
 
 
13
SELECT to_tsvector('testcfg','That''s my first own parser');
 
14
 
 
15
SELECT to_tsquery('testcfg', 'star');
 
16
 
 
17
SELECT ts_headline('testcfg','Supernovae stars are the brightest phenomena in galaxies',
 
18
       to_tsquery('testcfg', 'stars'));