Re: LEAST and GREATEST functions? - Mailing list pgsql-sql

From Ang Chin Han
Subject Re: LEAST and GREATEST functions?
Date
Msg-id 3F0277E6.9090906@bytecraft.com.my
Whole thread Raw
In response to Re: LEAST and GREATEST functions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: LEAST and GREATEST functions?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-sql by date:

Previous
From: "Atul Pedgaonkar"
Date:
Subject: About Postgresql Service on SUN OS
Next
From: "Jonathan Man"
Date:
Subject: SQL