"Karl O. Pinc" <[EMAIL PROTECTED]> writes: > I'd like to write: > SELECT larger(colA, colB) FROM foo > and am wondering the best way to go about it.
> Does somebody have a good solution? (I don't suppose there's > something built-in that I'm missing?) All the standard datatypes have built-in two-argument larger() functions, though they're generally named something more obscure than that; try \df *larger*. The MAX and MIN aggregates require larger() and smaller() functions --- if you can't find the function you want by name, look into pg_aggregate to see what the transition function for the relevant aggregate is. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])