Passing data out of indexam or tableam

Поиск
Список
Период
Сортировка
От Chris Cleveland
Тема Passing data out of indexam or tableam
Дата
Msg-id CABSN6Vf4W9ntWwfHq2RuWHjOK1xPux5766_4mb4vR-zpu9AsfQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

I'm attempting to develop a new type of full-text index. I've started
building a new index access method.

Is it possible to calculate values during the index scan and then make
them available for display in a select clause? For example,

SELECT title, score, total_hits
FROM mytable
WHERE (some search expression here)
ORDER BY score DESC
LIMIT 10

In this case, the index access method would calculate a score for each
row and attach it to the row for display. It would also calculate the
total number of hits, that is, rows that would be returned if there
were no LIMIT clause, and attach it only to the first row.

Is this possible?

Is it possible to do it with a table access method, as opposed to an
index access method?

-- 
Chris Cleveland
312-339-2677 mobile



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: straightening out backend process startup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: straightening out backend process startup