1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

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.
This commit is contained in:
Tom Lane
2011-11-22 20:45:05 -05:00
parent cddc819e45
commit df73584431
8 changed files with 24 additions and 119 deletions

View File

@@ -1495,11 +1495,9 @@ static void
makeRangeConstructors(const char *name, Oid namespace,
Oid rangeOid, Oid subtype)
{
static const char * const prosrc[4] = {"range_constructor0",
"range_constructor1",
"range_constructor2",
static const char * const prosrc[2] = {"range_constructor2",
"range_constructor3"};
static const int pronargs[4] = {0, 1, 2, 3};
static const int pronargs[2] = {2, 3};
Oid constructorArgTypes[3];
ObjectAddress myself,