|
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' |
6 |
title text, |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |
|
-- size integer |
|
|
size text |
|
|
); |
|
7 |
|
|
8 |
-- Search est-e index as table |
-- 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 |
-- select * from pgest('/index/path/','query', 'sort'); |
CREATE OR REPLACE FUNCTION pgest(text, text, text, int, text, text, text, int, int, text[]) |
10 |
CREATE OR REPLACE FUNCTION pgest(text, text, text) |
RETURNS setof record |
11 |
RETURNS SETOF __pgest |
AS 'pgest','pgest_node' |
12 |
AS 'pgest', 'pgest' |
LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT; |
13 |
LANGUAGE C IMMUTABLE STRICT; |
|
14 |
|
-- trigger for insert/update or delete |
15 |
|
CREATE OR REPLACE FUNCTION pgest_trigger() RETURNS TRIGGER |
16 |
|
AS 'pgest', 'pgest_trigger' |
17 |
|
LANGUAGE 'C' STRICT; |
18 |
|
|
|
CREATE OR REPLACE FUNCTION pgest2(text[]) |
|
|
RETURNS setof record |
|
|
AS 'pgest','pgest2' |
|
|
LANGUAGE 'C' IMMUTABLE STRICT; |
|