C function returning rows, was Boolean text, with phrase ranking, search under Postgres

From: "Edmar Wiggers" <edmar(at)brasmap(dot)com>
To: "markw" <markw(at)mohawksoft(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: C function returning rows, was Boolean text, with phrase ranking, search under Postgres
Date: 2000-10-17 00:06:42
Message-ID: NEBBIAKDCDHFGJMLHCKIMEEMCAAA.edmar@brasmap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-general

I too am interested in full text indexing under PostgreSQL.

Moreover, I have run into the same problem as you (in a different project
though): how do you return more than 1 value from a C function? I'd like to
return "rows", but, if at all possible, NOT to create a table. How about a
cursor? Perhaps one could then do something such as

insert into new_table select textsearch('bla...');

Does anyone know if it's possible?

> -----Original Message-----
> From: markw <markw(at)mohawksoft(dot)com>
> Sent: Monday, October 16, 2000 3:33 PM
> To: pgsql-announce(at)postgresql(dot)org,pgsql-general(at)postgresql(dot)org
> Subject: [ANNOUNCE] Boolean text, with phrase ranking, search under
> Postgres
>
>
> I am working on a GPL version of a boolean text search engine for
> PostgreSQL.
>
> How it works:
>
> You run a program which executes a query and builds a set of external
> indexes.
>
> Then you run a daemon process which does the processing of the text
> query.
>
> In postgres, you create a temporary table of results, call textsearch
> which populates the table,
> lastly, you join with the results table. The code looks like this:
>
> >>>>>>>>>>>>>
> --
> -- Create a temporary table for search results
> --
> create temp table search_result (key integer, rank integer);
> --
> -- Call search daemon to populate table
> --
> select textsearch('performer2{ waitresses } song { i know what boys like
> }');
... (cut) ...
> What I would like to do is create the result table in the function
> and/or accept a table name as a parameter. I can't seem to do this,
> perhaps I am missing something trivial.
>
> Is there a way to create a table from within 'c' and return it? I am
> not a postgres pro, I am a C/C++ guy and do not know the ins and outs of
> Postgres, and it should be a lot easier to make something more eficient.
> Any insign would be appreciated.

In response to

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Tom Lane 2000-10-17 00:51:58 Re: C function returning rows, was Boolean text, with phrase ranking, search under Postgres
Previous Message markw 2000-10-16 18:32:38 Boolean text, with phrase ranking, search under Postgres

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-10-17 00:51:58 Re: C function returning rows, was Boolean text, with phrase ranking, search under Postgres
Previous Message Tom Lane 2000-10-16 20:07:17 Re: PL/Perl compilation error