summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-11-22 20:45:05 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-11-22 20:45:05 -0500
commitdf73584431e7edb1dd76578777bd0fcc17b916a1 (patch)
tree3fb50fe824636a99d0af48ea153bfb362475c84b /doc/src
parentcddc819e45010492da00164d225a749661f43aef (diff)
Remove zero- and one-argument range constructor functions.
Per discussion, the zero-argument forms aren't really worth the catalog space (just write 'empty' instead). The one-argument forms have some use, but they also have a serious problem with looking too much like functional cast notation; to the point where in many real use-cases, the parser would misinterpret what was wanted. Committing this as a separate patch, with the thought that we might want to revert part or all of it if we can think of some way around the cast ambiguity.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/rangetypes.sgml20
1 files changed, 6 insertions, 14 deletions
diff --git a/doc/src/sgml/rangetypes.sgml b/doc/src/sgml/rangetypes.sgml
index 4a888a021dd..083560e9b2e 100644
--- a/doc/src/sgml/rangetypes.sgml
+++ b/doc/src/sgml/rangetypes.sgml
@@ -242,12 +242,11 @@ select '[4,4]'::int4range;
type. Using the constructor function is frequently more convenient than
writing a range literal constant, since it avoids the need for extra
quoting of the bound values. The constructor function
- accepts from zero to three arguments. The zero-argument form
- constructs an empty range; the one-argument form constructs a
- singleton range; the two-argument form constructs a range in
- standard form (lower bound inclusive, upper bound exclusive);
- and the three-argument form constructs a range in a form specified by the
- third argument. The third argument must be one of the strings
+ accepts two or three arguments. The two-argument form constructs a range
+ in standard form (lower bound inclusive, upper bound exclusive), while
+ the three-argument form constructs a range with bounds of the form
+ specified by the third argument.
+ The third argument must be one of the strings
<quote><literal>()</literal></quote>,
<quote><literal>(]</literal></quote>,
<quote><literal>[)</literal></quote>, or
@@ -255,7 +254,7 @@ select '[4,4]'::int4range;
For example:
<programlisting>
--- Three-argument form: lower bound, upper bound, and third argument indicating
+-- The full form is: lower bound, upper bound, and text argument indicating
-- inclusivity/exclusivity of bounds.
SELECT numrange(1.0, 14.0, '(]');
@@ -268,13 +267,6 @@ SELECT int8range(1, 14, '(]');
-- Using NULL for either bound causes the range to be unbounded on that side.
SELECT numrange(NULL, 2.2);
-
--- Single argument constructs a singleton range; that is a range consisting of
--- just one point.
-SELECT numrange(11.1);
-
--- Zero-argument form constructs an empty range.
-SELECT numrange();
</programlisting>
</para>
</sect2>