Re: LEAST and GREATEST functions?

From: Ang Chin Han <angch(at)bytecraft(dot)com(dot)my>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 06:12:54
Message-ID: 3F0277E6.9090906@bytecraft.com.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom Lane wrote:

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

That's what I'm suggesting: hard-wiring LEAST and GREATEST into the
parser. 7.5, maybe?

The question is: is it worth hard-wiring vs functions? (time passes)
Doesn't seem to be in SQL92. It's in Oracle, Interbase and MySQL,
though, says google.

I'd say we need to have LEAST and GREATEST at least somewhere in contrib
(as functions) if not core, to make transition from other RDBMS to
postgresql easier.

A brief test shows that we would incur quite a performance penalty (I
compared COALESCE with coalesce_sql_function) if it isn't hardwiring.

--
Linux homer 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux
1:30pm up 188 days, 4:35, 4 users, load average: 5.03, 5.06, 5.08

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Atul Pedgaonkar 2003-07-02 06:13:17 About Postgresql Service on SUN OS
Previous Message Tom Lane 2003-07-02 05:37:22 Re: LEAST and GREATEST functions?