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

Re: Singleton range constructors versus functional coercion notation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Singleton range constructors versus functional coercion notation
Date: 2011-11-21 14:55:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Nov 20, 2011, at 10:24 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>> Well, if there were a good shorter notation, then probably so. But it
>> doesn't look like we have a good idea, so I'm fine with dropping it.

> We should also keep in mind that people who use range types can and likely will define their own convenience functions.  If people use singletons, or open ranges, or closed ranges, or one-hour timestamp ranges frequently, they can make their own notational shorthand with a 3-line CREATE FUNCTION statement.  We don't need to have it all in core.

But if you believe that, what syntax do you think people are likely to
try if they want a singleton range constructor?  Leaving the user to
discover the problem and try to invent a workaround is not better than
doing it ourselves ...

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Merlin MoncureDate: 2011-11-21 16:30:16
Subject: Re: [PATCH] Support for foreign keys with arrays
Previous:From: Tom LaneDate: 2011-11-21 14:52:56
Subject: Re: [Review] Include detailed information about a row failing a CHECK constraint into the error message

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