Re: Singleton range constructors versus functional coercion notation
| От | Tom Lane | 
|---|---|
| Тема | Re: Singleton range constructors versus functional coercion notation | 
| Дата | |
| Msg-id | 23450.1321736235@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: Singleton range constructors versus functional coercion notation (Jeff Davis <pgsql@j-davis.com>) | 
| Ответы | 
                	
            		Re: Singleton range constructors versus functional coercion notation
            		
            		 Re: Singleton range constructors versus functional coercion notation  | 
		
| Список | pgsql-hackers | 
Jeff Davis <pgsql@j-davis.com> writes:
> On Sat, 2011-11-19 at 12:27 -0500, Tom Lane wrote:
>> I don't immediately see a solution that's better than dropping the
>> single-argument range constructors.
> We could change the name, I suppose, but that seems awkward.
Yeah, something like int4range_1(42) would work, but it seems rather
ugly.
> I'm hesitant to remove them because the alternative is significantly
> more verbose:
>   numrange(1.0, 1.0, '[]');
Right.  The question is, does the case occur in practice often enough
to justify a shorter notation?  I'm not sure.
One thing I've been thinking for a bit is that for discrete ranges,
I find the '[)' canonical form to be surprising/confusing.  If we
were to fix range_adjacent along the lines suggested by Florian,
would it be practical to go over to '[]' as the canonical form?
One good thing about that approach is that canonicalization wouldn't
have to involve generating values that might overflow.
        regards, tom lane
		
	В списке pgsql-hackers по дате отправления: