Max/min of 2 values function, plpgsql efficency? - Mailing list pgsql-general

From Karl O. Pinc
Subject Max/min of 2 values function, plpgsql efficency?
Date
Msg-id 20040302095227.E31878@mofo.meme.com
Whole thread Raw
Responses Re: Max/min of 2 values function, plpgsql efficency?
Re: Max/min of 2 values function, plpgsql efficency?
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Data in table changed?
Next
From: "scott.marlowe"
Date:
Subject: Re: Setting up Postgresql on Linux