Skip site navigation (1) Skip section navigation (2)

Re: Singleton range constructors versus functional coercion notation

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Singleton range constructors versus functional coercion notation
Date: 2011-11-22 16:53:41
Message-ID: 1321980821.23754.6.camel@jdavis (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, 2011-11-22 at 09:07 -0500, Robert Haas wrote:
> I honestly don't know what function names people will pick, and I
> don't care.  Someone might like singleton(x), which would be
> impractical as a built-in because there could be more than one range
> type over the same base type, but if the user defines the function
> they can pick what's convenient for them.  If they use singletons
> exceedingly frequently they might even want something really short,
> like just(x) or s(x).  Or they might say daterange1(x), along the
> lines you suggested earlier.

For that matter, they might pick daterange(x), as I picked earlier, and
run into the same problems.

It's a little strange that we allow people to define functions with one
argument and the same name as a type if such functions are confusing.

This isn't intended as an argument in either direction, just an

	Jeff Davis

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2011-11-22 17:23:17
Subject: Re: strange nbtree corruption report
Previous:From: Tom LaneDate: 2011-11-22 15:18:15
Subject: Re: EXPLAIN (plan off, rewrite off) for benchmarking

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group