Re: LEAST and GREATEST functions?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ang Chin Han <angch(at)bytecraft(dot)com(dot)my>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Josh Berkus <josh(at)agliodbs(dot)com>, Stefan Bill <sjb26(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: LEAST and GREATEST functions?
Date: 2003-07-02 05:37:22
Message-ID: 24828.1057124242@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ang Chin Han <angch(at)bytecraft(dot)com(dot)my> writes:
> If LEAST and GREATEST can accept any number of parameters, wouldn't it
> make sense to code it like the way COALESCE works, rather than defining
> a function for it? This way we don't need define all the various
> functions with different types.

But COALESCE is a special feature hard-wired into the parser. There's
no free lunch --- you pay for your extensibility somewhere.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ang Chin Han 2003-07-02 06:12:54 Re: LEAST and GREATEST functions?
Previous Message Stephan Szabo 2003-07-02 04:14:49 Re: Break referential integrity.