pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ang Chin Han <angch@bytecraft.com.my>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Stefan Bill <sjb26@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: LEAST and GREATEST functions?
Date: Wed, 02 Jul 2003 14:12:54 +0800
Message-ID: <3F0277E6.9090906@bytecraft.com.my> (raw)
In-Reply-To: <24828.1057124242@sss.pgh.pa.us>
References: <20030630201057.14507.qmail@web13905.mail.yahoo.com>
	<200306302032.23113.josh@agliodbs.com>
	<87d6gu2otf.fsf@stark.dyndns.tv>
	<3F025942.6000507@bytecraft.com.my>
	<24828.1057124242@sss.pgh.pa.us>

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

view thread (14+ messages)  latest in thread

Message-ID: <3F0277E6.9090906@bytecraft.com.my>
Permalink:  ../3F0277E6.9090906@bytecraft.com.my/
Also on:    postgresql.org/message-id/3F0277E6.9090906@bytecraft.com.my

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: angch@bytecraft.com.my, tgl@sss.pgh.pa.us, gsstark@mit.edu, josh@agliodbs.com, sjb26@yahoo.com
  Subject: Re: LEAST and GREATEST functions?
  In-Reply-To: <3F0277E6.9090906@bytecraft.com.my>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox