diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 16 | ||||
-rw-r--r-- | src/bin/pg_upgrade/function.c | 6 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 799b6988b7a..ec3e2c63b0c 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -11396,9 +11396,9 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang) } /* - * If the functions are dumpable then emit a traditional CREATE LANGUAGE - * with parameters. Otherwise, we'll write a parameterless command, which - * will rely on data from pg_pltemplate. + * If the functions are dumpable then emit a complete CREATE LANGUAGE with + * parameters. Otherwise, we'll write a parameterless command, which will + * be interpreted as CREATE EXTENSION. */ useParams = (funcInfo != NULL && (inlineInfo != NULL || !OidIsValid(plang->laninline)) && @@ -11431,11 +11431,11 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang) /* * If not dumping parameters, then use CREATE OR REPLACE so that the * command will not fail if the language is preinstalled in the target - * database. We restrict the use of REPLACE to this case so as to - * eliminate the risk of replacing a language with incompatible - * parameter settings: this command will only succeed at all if there - * is a pg_pltemplate entry, and if there is one, the existing entry - * must match it too. + * database. + * + * Modern servers will interpret this as CREATE EXTENSION IF NOT + * EXISTS; perhaps we should emit that instead? But it might just add + * confusion. */ appendPQExpBuffer(defqry, "CREATE OR REPLACE PROCEDURAL LANGUAGE %s", qlanname); diff --git a/src/bin/pg_upgrade/function.c b/src/bin/pg_upgrade/function.c index 28638e951ee..d163cb2dde7 100644 --- a/src/bin/pg_upgrade/function.c +++ b/src/bin/pg_upgrade/function.c @@ -214,13 +214,9 @@ check_loadable_libraries(void) * plpython2u language was created with library name plpython2.so * as a symbolic link to plpython.so. In Postgres 9.1, only the * plpython2.so library was created, and both plpythonu and - * plpython2u pointing to it. For this reason, any reference to + * plpython2u point to it. For this reason, any reference to * library name "plpython" in an old PG <= 9.1 cluster must look * for "plpython2" in the new cluster. - * - * For this case, we could check pg_pltemplate, but that only - * works for languages, and does not help with function shared - * objects, so we just do a general fix. */ if (GET_MAJOR_VERSION(old_cluster.major_version) < 901 && strcmp(lib, "$libdir/plpython") == 0) |