mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Create stub functions to support pg_upgrade of old contrib/tsearch2.
Commits9ff60273e3anddbe2328959adjusted the declarations of some core functions referenced by contrib/tsearch2's install script, forgetting that in a pg_upgrade situation, we'll be trying to restore operator class definitions that reference the old signatures. We've hit this problem before; solve it in the same way as before, namely by installing stub functions that have the expected signature and just invoke the correct function. Per report from Jeff Janes. (Someday we ought to stop supporting contrib/tsearch2, but I'm not sure today is that day.)
This commit is contained in:
@@ -377,3 +377,23 @@ gin_tsquery_consistent_6args(PG_FUNCTION_ARGS)
|
||||
elog(ERROR, "gin_tsquery_consistent requires eight arguments");
|
||||
return gin_tsquery_consistent(fcinfo);
|
||||
}
|
||||
|
||||
/*
|
||||
* Likewise, a stub version of gin_extract_tsquery declared with argument
|
||||
* types that are no longer considered appropriate.
|
||||
*/
|
||||
Datum
|
||||
gin_extract_tsquery_oldsig(PG_FUNCTION_ARGS)
|
||||
{
|
||||
return gin_extract_tsquery(fcinfo);
|
||||
}
|
||||
|
||||
/*
|
||||
* Likewise, a stub version of gin_tsquery_consistent declared with argument
|
||||
* types that are no longer considered appropriate.
|
||||
*/
|
||||
Datum
|
||||
gin_tsquery_consistent_oldsig(PG_FUNCTION_ARGS)
|
||||
{
|
||||
return gin_tsquery_consistent(fcinfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user