| От | Joel Burton |
|---|---|
| Тема | Can I create a function that returns many records? |
| Дата | |
| Msg-id | 3975A98C.26157.984840B@localhost обсуждение исходный текст |
| Ответы |
Re: Can I create a function that returns many records?
|
| Список | pgsql-sql |
I'd like to create a function that outs the results of a select query.
It might work like this:
SELECT METAPHONE('jennifer foobar');
persid | name
----------------------------- 1 | jennifer fubar 10 | gennifer foobar
[I already have the metaphone comparing working, it's the returning
the SELECt that needs help.]
Working through the documentation, I see examples using CREATE
FUNCTION METAPHONE(text) RETURNS setof tblPerson AS 'SELECT
* FROM tblPerson' LANGUAGE 'sql', but this returns only a single
numeric value (that doesn't seem to correspond to anything.)
Is there a way to do this? Any help would be very appreciated.
--
Joel Burton, Director of Information Systems -*- jburton@scw.org
Support Center of Washington (www.scw.org)
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера