pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ang Chin Han <angch@bytecraft.com.my>
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 01:37:22 -0400
Message-ID: <24828.1057124242@sss.pgh.pa.us> (raw)
In-Reply-To: <3F025942.6000507@bytecraft.com.my>
References: <20030630201057.14507.qmail@web13905.mail.yahoo.com>
	<200306302032.23113.josh@agliodbs.com>
	<87d6gu2otf.fsf@stark.dyndns.tv>
	<3F025942.6000507@bytecraft.com.my>

Ang Chin Han <angch@bytecraft.com.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



view thread (14+ messages)  latest in thread

Message-ID: <24828.1057124242@sss.pgh.pa.us>
Permalink:  ../24828.1057124242@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24828.1057124242@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, angch@bytecraft.com.my, gsstark@mit.edu, josh@agliodbs.com, sjb26@yahoo.com
  Subject: Re: LEAST and GREATEST functions?
  In-Reply-To: <24828.1057124242@sss.pgh.pa.us>

* 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