| От | Tom Lane |
|---|---|
| Тема | Re: Limitations of PostgreSQL |
| Дата | |
| Msg-id | 23203.1129221271@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Limitations of PostgreSQL (Scott Marlowe <smarlowe@g2switchworks.com>) |
| Список | pgsql-general |
Scott Marlowe <smarlowe@g2switchworks.com> writes:
> I could see how it might be possible to make a two argument user defined
> function that took an argument like:
> select intvl(10,'20 30 40 50 60');
> so that the multiple arguments are really just a space or comma
> separated list fed to the function. I wouldn't name it interval though.
Use an array:
select intvl(10, array[20,30,40,50,60]);
I think you could even code this as a generic polymorphic function:
create function intvl(anyelement, anyarray) returns anyelement ...
Anybody feel like filling it in with a standard binary search algorithm?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера