On April 18, 2006 10:37 am, "Matt Arnilo S. Baluyos (Mailing Lists)"
> To do a full-text search, I only need to do this:
> SELECT search('string');
> However, running the function gives me a recordset with only one
> column ("search"). I'd like to be able to access the fields of the
> composite type (search_result) that is returned by the function -
> article_id, article_title, headline, and rank. I haven't figured out
> how to do this but it's necessary because I want to be able to control
> the formatting of the output.
In general, a set-returning function looks like a table, ie:
SELECT article_id, article_title, headline, and rank FROM search('string');
Assuming your function works right. I get an error when trying to call a
set-returning function as SELECT function();, though, so I don't know how
yours is doing anything.
In response to
pgsql-novice by date
|Next:||From: Eric Matthew Finnin||Date: 2006-04-18 17:58:34|
|Subject: Re: The COPY command and csv files|
|Previous:||From: Matt Arnilo S. Baluyos (Mailing Lists)||Date: 2006-04-18 17:45:27|
|Subject: Re: Accessing fields in a function that returns a set of composite type - How?|