From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Retiring pg_regress' --load-language option
Date: Thu, 13 Feb 2020 15:56:33 -0500
Message-ID: <6853.1581627393@sss.pgh.pa.us> (raw)
pg_regress' --load-language option has been unused in the core code since
we introduced extensions in 9.1; all callers now use --load-extension
instead. It's a fairly safe bet that it's never been used by any non-core
code, since it could only work for languages listed in pg_pltemplate.
The last possible reason to use it expired with commit 50fc694e4, which
removed pg_pltemplate and made parameterless CREATE LANGUAGE equivalent
to CREATE EXTENSION. So I think we might as well kill it, as per the
attached trivial patch. Any objections?
regards, tom lane
Attachments:
[text/x-diff] remove-load-language-option.patch (2.5K, ../6853.1581627393@sss.pgh.pa.us/2-remove-load-language-option.patch)
download | inline diff:diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.cindex 92bd28d..9a4e52b 100644--- a/src/test/regress/pg_regress.c+++ b/src/test/regress/pg_regress.c@@ -76,7 +76,6 @@ char *inputdir = ".";
char *outputdir = ".";
char *bindir = PGBINDIR;
char *launcher = NULL;
-static _stringlist *loadlanguage = NULL;
static _stringlist *loadextension = NULL;
static int max_connections = 0;
static int max_concurrent_tests = 0;
@@ -1998,16 +1997,6 @@ create_database(const char *dbname)
dbname, dbname, dbname, dbname, dbname, dbname);
/*
- * Install any requested procedural languages. We use CREATE OR REPLACE- * so that this will work whether or not the language is preinstalled.- */- for (sl = loadlanguage; sl != NULL; sl = sl->next)- {- header(_("installing %s"), sl->str);- psql_command(dbname, "CREATE OR REPLACE LANGUAGE \"%s\"", sl->str);- }-- /*
* Install any requested extensions. We use CREATE IF NOT EXISTS so that
* this will work whether or not the extension is preinstalled.
*/
@@ -2058,8 +2047,6 @@ help(void)
printf(_(" --launcher=CMD use CMD as launcher of psql\n"));
printf(_(" --load-extension=EXT load the named extension before running the\n"));
printf(_(" tests; can appear multiple times\n"));
- printf(_(" --load-language=LANG load the named language before running the\n"));- printf(_(" tests; can appear multiple times\n"));
printf(_(" --max-connections=N maximum number of concurrent connections\n"));
printf(_(" (default is 0, meaning unlimited)\n"));
printf(_(" --max-concurrent-tests=N maximum number of concurrent tests in schedule\n"));
@@ -2096,7 +2083,6 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
{"dbname", required_argument, NULL, 1},
{"debug", no_argument, NULL, 2},
{"inputdir", required_argument, NULL, 3},
- {"load-language", required_argument, NULL, 4},
{"max-connections", required_argument, NULL, 5},
{"encoding", required_argument, NULL, 6},
{"outputdir", required_argument, NULL, 7},
@@ -2172,9 +2158,6 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
case 3:
inputdir = pg_strdup(optarg);
break;
- case 4:- add_stringlist_item(&loadlanguage, optarg);- break;
case 5:
max_connections = atoi(optarg);
break;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: Retiring pg_regress' --load-language option
In-Reply-To: <6853.1581627393@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox