Re: Range Types and extensions - Mailing list pgsql-hackers

From Darren Duncan
Subject Re: Range Types and extensions
Date
Msg-id 4DEC63D0.1050304@darrenduncan.net
Whole thread Raw
In response to Re: Range Types and extensions  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule wrote:
> 2011/6/6 Darren Duncan <darren@darrenduncan.net>:
>> Jeff Davis wrote:
>>> I'd like to take another look at Range Types and whether part of it
>>> should be an extension. Some of these issues relate to extensions in
>>> general, not just range types.
>>>
>>> First of all, what are the advantages to being in core?
> 
> it should be supported by FOREACH statement in PL/pgSQL

Yes, absolutely.  I know this feature is loved in Perl.  But this usage would 
only work for a more limited range of data types, namely those over which one 
can build a sequence generator, such as integers, because they have a 
next-value/prev-value function defined.  In other words, while range types in 
general would work for any ordered type, FOREACH would only work for the subset 
of those that are ordinal types. -- Darren Duncan


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Range Types and extensions
Next
From: Dan Ports
Date:
Subject: Re: SIREAD lock versus ACCESS EXCLUSIVE lock