1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

Add backwards-compatible declarations of some core GIN support functions.

These are needed to support reloading dumps of 9.0 installations containing
contrib/intarray or contrib/tsearch2.  Since not only regular dump/reload
but binary upgrade would fail, it seems worth the trouble to carry these
stubs for awhile.  Note that the contrib opclasses referencing these
functions will still work fine, since GIN doesn't actually pay any
attention to the declared signature of a support function.
This commit is contained in:
Tom Lane
2011-02-16 17:24:06 -05:00
parent b15fabf997
commit 6595dd04d1
7 changed files with 72 additions and 3 deletions

View File

@@ -58,6 +58,20 @@ ginarrayextract(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(elems);
}
/*
* Formerly, ginarrayextract had only two arguments. Now it has three,
* but we still need a pg_proc entry with two args to support reloading
* pre-9.1 contrib/intarray opclass declarations. This compatibility
* function should go away eventually.
*/
Datum
ginarrayextract_2args(PG_FUNCTION_ARGS)
{
if (PG_NARGS() < 3) /* should not happen */
elog(ERROR, "ginarrayextract requires three arguments");
return ginarrayextract(fcinfo);
}
/*
* extractQuery support function
*/