/[pgswish]/trunk/pgswish.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/pgswish.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by dpavlin, Sat Feb 19 16:01:46 2005 UTC revision 14 by dpavlin, Sat Feb 19 20:59:17 2005 UTC
# Line 7  CREATE TYPE __pgswish AS ( Line 7  CREATE TYPE __pgswish AS (
7          size integer          size integer
8  );  );
9    
10  --                         pgswish('/index/path/','query', 'property' 'sort');  -- Search swish-e index as table
11  CREATE OR REPLACE FUNCTION pgswish(text, text, text, text)  -- select * from pgswish('/index/path/','query', 'sort');
12    CREATE OR REPLACE FUNCTION pgswish(text, text, text)
13          RETURNS SETOF __pgswish          RETURNS SETOF __pgswish
14          AS 'pgswish', 'pgswish'          AS 'pgswish', 'pgswish'
15          LANGUAGE C IMMUTABLE STRICT;          LANGUAGE C IMMUTABLE STRICT;
16    
17    -- get property value while retriving results with pgswish
18    -- select *,pgtextprop('property') from pgswish(...) ...
19    
20    CREATE OR REPLACE FUNCTION swtextprop(text)
21            RETURNS text
22            AS 'pgswish', 'swtextprop'
23            LANGUAGE C STRICT;

Legend:
Removed from v.13  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26