Max/min of 2 values function, plpgsql efficency?

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Max/min of 2 values function, plpgsql efficency?
Дата
Msg-id 20040302095227.E31878@mofo.meme.com
обсуждение исходный текст
Ответы Re: Max/min of 2 values function, plpgsql efficency?
Re: Max/min of 2 values function, plpgsql efficency?
Список pgsql-general
I'd like to write:

SELECT larger(colA, colB) FROM foo

and am wondering the best way to go about it.

(Really, I'd like the larger() function to take an arbitrary
number of arguments but I don't see how to do that.)

Are there significant performance penalities if I were to use a
a homemade plpgpgql function?

Does somebody have a good solution?  (I don't suppose there's
something built-in that I'm missing?)

Thanks.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Data in table changed?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Setting up Postgresql on Linux