Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
David E. Wheeler <david@kineticode.com>
From: David E. Wheeler <david@kineticode.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>, David Fetter <david@fetter.org>, Euler Taveira de Oliveira <euler@timbira.com>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2010-02-19T17:07:13Z
Lists: pgsql-hackers
On Feb 19, 2010, at 7:43 AM, David E. Wheeler wrote:
> Usually PGXS loads after setting all the environment variables, though I suspect that it wouldn't have any side effects to set regress_opts afterward. Also, there is no MAJORVERSION in earlier versions, so module authors would have to work around that.
>
> Basically though, you're asking all third party module authors who depend on plpgsql in their code and/or tests to modify their makefiles and release new versions to work around something that pg_regress could have fixed internally in 1-2 lines of code and be done with it.
I'm sure this is bad C and should do a case-insensitive comparison, but this is essentially what I mean:
*** a/src/test/regress/pg_regress.c
--- b/src/test/regress/pg_regress.c
*************** create_database(const char *dbname)
*** 1795,1802 ****
*/
for (sl = loadlanguage; sl != NULL; sl = sl->next)
{
! header(_("installing %s"), sl->str);
! psql_command(dbname, "CREATE LANGUAGE \"%s\"", sl->str);
}
}
--- 1795,1804 ----
*/
for (sl = loadlanguage; sl != NULL; sl = sl->next)
{
! if (sl->str != "plpgsql") {
! header(_("installing %s"), sl->str);
! psql_command(dbname, "CREATE LANGUAGE \"%s\"", sl->str);
! }
}
}
Does that seem unreasonable?
Best,
David