Range Types
New patch. All known TODO items are closed, although I should do a
cleanup pass over the code and docs.
Fixed in this patch:
* Many documentation improvements
* Added INT8RANGE
* Renamed PERIOD[TZ] -> TS[TZ]RANGE
* Renamed INTRANGE -> INT4RANGE
* Improved parser's handling of whitespace and quotes
* Support for PL/pgSQL functions with ANYRANGE arguments/returns
* Make "subtype_float" function no longer a requirement for GiST,
but it should still be supplied for the penalty function to be
useful.
There are some open issues remaining, however:
* Is typmod worth doing? I could complete it pretty quickly, but it
involves introducing a new Node type, which seems a little messy for the
benefit.
* Should pg_range reference the btree opclass or the compare function
directly?
* Should subtype_cmp default to the default btree opclass's compare
function?
* Right now only superusers can define a range type. Should we open it
up to normal users?
* Should the SQL (inlinable) function "length", which relies on
polymorphic "-", be immutable, strict, or volatile?
* Later we might consider whether we should include btree_gist in
core, to make range types more useful with exclusion constraints
out-of-the-box. This should be left for later, I'm just including this
for the archives so it doesn't get lost.
Regards,
Jeff Davis
Attachments:
rangetypes-20110205.patch.gzapplication/x-gzip; name=rangetypes-20110205.patch.gzDownload
� �>NM �=ks�F��/�b�J��
R��,�Jd���N�����/��!�h<$so��_w� @B�mY�T6+3=�����i<y���^4�Hb��xlxn���)o����&,j�$��f��������#v����� ��~��)�_�������I����:=��_���S}��j������8��1����)=q�1����V ��{/��$�����[v��i�OB3��x��#����P6�k�������UHw_��������/�4��A�r��v{Zw�8��z�s����B��g��Q���O�yL��h8�����pF�l�'�E�S&.�����b�����g1�}V�>{mh�l��� 8m�C���S��3;@,,bl��M{����',�rS��QI���O��Fp��!h�z�9;����#A����$lN�`6����?\;`�=�|?#�k�����%���X @�n�3�s��� @5 �E�vt��+���-��P�e�"��`��BD���I��Q,�",�I�4}�>
�D 95��1����� �P�OX�pO��--��� gn�DT�M�Q�2e
A��� a���b�������������a6�'�<�[J?�n�ZFE�$E���2������s�C���6�����B)*WP�u�jt�m9�m�z.X:�����(����BY4b��}7`~}y��RB)(��-%IA$q�`��5�� �[����
]��F~������T,�@n �,�&� �yH�D��%���4b�:�U�(�8�Q*u0�P��<� J�&h#=4Z������n�����(>X��z�P���q��2�u2����i��n��H�)�v��02(xH�����x�V@H��2g�(Q��o(Q���5���Bf����UH���D�*�L��+lE)S��"lB�4�� ��nd�����������fG�3����.<���~�D���&� �D>-5s��0�O�u��%d���"�B ��*����!���N��;�r7FVM���R~��?��j��a�������Yi�V�m�����G��tP���Lx�6����A�h&A�%�@�J�� Vd�eP����bx�����M�����#s=/��<(2�A���%\a�X�!F���������<���r��7(U�g�m) ��(9���t�&����������wl
T��tK�'��>��|T��S�c���X>R����&������*v���G%��Y���s�G%mSX��7XT[�H�/�X�jN����Y{{�g����.'���7��n�q�=^!���
�j��
,���=��������}q(w8���7��rK@ng��v���2��SZL��lj�xRZi�5P�6#����� �b�Ut#tH���k4b T���&P��#��HU�eL��Y.��8��).����m��\q�;,F�s�
t���k�c*V��F���d��gB-�������A�����y78|q���d������U����M�g��^��:������pn�5C5�+]��r�c������q���h�o�u��l�6L����[��G��Oh�g������XK�7�{��.���*�wB�b1���W�a:,R�[���:k3��+H��x�L�����UH0.��}�$�����O��G�������N������� ��&b�q�c����w��}X�����Z�$9H�P�[[6�m��js�{�� dN���yt������+�o"C\���d�������[�c����i�%��
��Oqc�G)�FwX����n;��}����A ��W���N��Y.������8�� @RYW^G|�H��������/����R K&����@��"QA�!���k����s�
��W�!\�Ow�B�� C(�h��|�!��Z_�C��p:�=����r�agY�;q������������J�.�������=L�����9�d��Ogq�t���� ��i:��������G�}�� �����2Rm
_���g~o
~�n�z �qOO���x�z���3?�=K�7�Pt�� �B/a�[�f:���
��\�l:��Z��S�n�CD�N�$���,�
K�e3�9fF<�k���I�\��a�V��& �+6;ml�(qP��+�����.����)�ts��#d���&�����T�0 ?����l |b�0Y�Hbw�����/?� 4'�� <�=.)��@�$��Rv�R"���S�f
5,��������8��7���n����N��<��~8Ti���!�>\�������^-@J����W$��8�0���c��L����i�N��{@y����1q5�}�B��Z��,
��e�����O ��2�0 ^Lti��pE$��k����f�T��'�bxC�AB�Tl5�I����/���$B��� �Z(G�Ij�!&�,��������''�;�?�� %$�����4r� ��,��B�� � ����N����R��y���������_^��_������p |�N���@����Q�"Z]W�O��
���Y�?8C��� \��pU:�C�c���
�����j1 �����3��!,�N/����!��F���o�x��!���^�� $���@1D�$��z�i����h%�-�)�-�� |71�p���v�-c��
<�b,���A0E����C��\�"5��7V,V����w�e�^_���_������K5^�q���^�}Q������jc�����\I/�;�����K�-��������_xe$ �niM���7��n_�m��a��UP2�.l���6T6���pM�R<