Re: PGXS: REGRESS_OPTS=--load-language=plpgsql - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
Date
Msg-id D6445A15-9E7E-400E-ACA5-2C634C90571A@kineticode.com
Whole thread Raw
In response to Re: PGXS: REGRESS_OPTS=--load-language=plpgsql  ("David E. Wheeler" <david@kineticode.com>)
List 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
effectsto set regress_opts afterward. Also, there is no MAJORVERSION in earlier versions, so module authors would have
towork around that. 
>
> Basically though, you're asking all third party module authors who depend on plpgsql in their code and/or tests to
modifytheir makefiles and release new versions to work around something that pg_regress could have fixed internally in
1-2lines 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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: alpha4 bundled -- please verify
Next
From: Tom Lane
Date:
Subject: Re: Merge join and index scan strangeness