Max/min of 2 values function, plpgsql efficency?

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Max/min of 2 values function, plpgsql efficency?
Date: 2004-03-02 15:52:27
Message-ID: 20040302095227.E31878@mofo.meme.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron St-Pierre 2004-03-02 16:08:49 Re: Setting up Postgresql on Linux
Previous Message scott.marlowe 2004-03-02 15:45:30 Re: How to drop sequence?