aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginarrayproc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-02-16 17:24:06 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-02-16 17:24:46 -0500
commit6595dd04d136d5c97ae05fc580572c8f00042143 (patch)
tree149ade470a6058e4cc332f5c22bf7230cd8f2c48 /src/backend/access/gin/ginarrayproc.c
parentb15fabf997fb3cd5e0680a6ad7576377774aae07 (diff)
downloadpostgresql-6595dd04d136d5c97ae05fc580572c8f00042143.tar.gz
postgresql-6595dd04d136d5c97ae05fc580572c8f00042143.zip
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.
Diffstat (limited to 'src/backend/access/gin/ginarrayproc.c')
-rw-r--r--src/backend/access/gin/ginarrayproc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/access/gin/ginarrayproc.c b/src/backend/access/gin/ginarrayproc.c
index 2100c5fd0e4..ce9abae6aa4 100644
--- a/src/backend/access/gin/ginarrayproc.c
+++ b/src/backend/access/gin/ginarrayproc.c
@@ -59,6 +59,20 @@ ginarrayextract(PG_FUNCTION_ARGS)
}
/*
+ * 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
*/
Datum