--- trunk/pgest.sql	2005/05/20 12:19:05	1
+++ trunk/pgest.sql	2005/07/06 14:47:56	31
@@ -1,22 +1,7 @@
-drop type __pgest cascade;
 
-CREATE TYPE __pgest AS (
---	id integer,
-	id text,
-	uri text,
-	title text,
---	size integer
-	size text
-);
+-- select * from pgest('/index/path', 'query', '@title ISTRINC foo', '@title STRA', limit, offset, ARRAY['@id','@title','@size']) as (id text, title text, size text);
+CREATE OR REPLACE FUNCTION pgest(text, text, text, text, int, int, text[])
+	RETURNS setof record
+	AS 'pgest','pgest_attr'
+	LANGUAGE 'C' IMMUTABLE CALLED ON NULL INPUT;
 
--- Search est-e index as table
--- select * from pgest('/index/path/','query', 'sort');
-CREATE OR REPLACE FUNCTION pgest(text, text, text)
-	RETURNS SETOF __pgest
-	AS 'pgest', 'pgest'
-	LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION pgest2(text[])
-RETURNS setof record
-AS 'pgest','pgest2'
-LANGUAGE 'C' IMMUTABLE STRICT;
