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:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user