|
drop type __pgest cascade; |
|
1 |
|
|
2 |
CREATE TYPE __pgest AS ( |
-- select * from pgest('/index/path', 'query', '@title ISTRINC foo', '@title STRA', limit, offset, ARRAY['@id','@title','@size']) as (id text, title text, size text); |
3 |
-- id integer, |
CREATE OR REPLACE FUNCTION pgest(text, text, text, text, int, int, text[]) |
4 |
id text, |
RETURNS setof record |
5 |
uri text, |
AS 'pgest','pgest_attr' |
|
title text, |
|
|
-- size integer |
|
|
size text |
|
|
); |
|
|
|
|
|
-- Search est-e index as table |
|
|
-- select * from pgest('/index/path','query', '@uri ISTREW .txt', limit, offset); |
|
|
CREATE OR REPLACE FUNCTION pgest(text, text, text, int, int) |
|
|
RETURNS SETOF __pgest |
|
|
AS 'pgest', 'pgest' |
|
6 |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |
7 |
|
|
8 |
-- select * from pgest('/index/path', 'query', '@title ISTRINC foo', limit, offset, {'@id','@title','@size'}) as (id text, title text, size text); |
-- select * from pgest('http://localhost:1978/node/trivia', 'admin', 'admin', depth, 'query', '@title ISTRINC foo', '@title STRA', limit, offset, ARRAY['@id','@title','@size']) as (id text, title text, size text); |
9 |
CREATE OR REPLACE FUNCTION pgest(text, text, text, int, int, text[]) |
CREATE OR REPLACE FUNCTION pgest(text, text, text, int, text, text, text, int, int, text[]) |
10 |
RETURNS setof record |
RETURNS setof record |
11 |
AS 'pgest','pgest_attr' |
AS 'pgest','pgest_node' |
12 |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |