Re: Function call order dependency

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Function call order dependency
Дата
Msg-id 603c8f070809030956n1d4cce92m3b35f08b9696dc08@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function call order dependency  (pgsql@mohawksoft.com)
Ответы Re: Function call order dependency
Список pgsql-hackers
> I was kind of afraid of that. So, how could one implement such a function
> set?

Write a function (say, score_contains) that returns NULL whenever
contains would return false, and the score otherwise.

SELECT * FROM (   SELECT *, score_contains(mytable.title, 'Winding Road', 1) AS
score FROM mytable
) x WHERE x.score IS NOT NULL
ORDER BY x.score

...Robert


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: libpq object hooks (libpq events)
Следующее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Function call order dependency