/[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

Annotation of /trunk/pgswish.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (hide annotations)
Sun May 29 22:41:20 2005 UTC (18 years, 11 months ago) by dpavlin
File size: 661 byte(s)
Added pgswish_arr function using SFRM_Materialize mode. Integer properties
doesn't work yet.

1 dpavlin 8 drop type __pgswish cascade;
2    
3     CREATE TYPE __pgswish AS (
4 dpavlin 13 rank integer,
5 dpavlin 8 path text,
6     headline text,
7 dpavlin 13 size integer
8 dpavlin 8 );
9    
10 dpavlin 14 -- Search swish-e index as table
11     -- select * from pgswish('/index/path/','query', 'sort');
12     CREATE OR REPLACE FUNCTION pgswish(text, text, text)
13 dpavlin 8 RETURNS SETOF __pgswish
14     AS 'pgswish', 'pgswish'
15     LANGUAGE C IMMUTABLE STRICT;
16    
17 dpavlin 22 -- select * from pgswish_arr('/index/path', 'query', 'placeholder', limit, offset, ARRAY['@id','@title','@size']) as (id text, title text, size text);
18     CREATE OR REPLACE FUNCTION pgswish(text, text, text, int, int, text[])
19     RETURNS setof record
20     AS 'pgswish','pgswish_arr'
21     LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT;

  ViewVC Help
Powered by ViewVC 1.1.26