From: Tom Lane on
David Fetter <david(a)fetter.org> writes:
> While hacking on PL/Parrot, I ran across an issue where when trying to
> load PL/pgsql, it's done unconditionally and fails. How do we fix
> pg_regress to be a little more subtle about this?

Why exactly would we want it to not fail? Regression tests are not
about papering over problems.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: "David E. Wheeler" on
On Feb 18, 2010, at 3:27 PM, Tom Lane wrote:

>> While hacking on PL/Parrot, I ran across an issue where when trying to
>> load PL/pgsql, it's done unconditionally and fails. How do we fix
>> pg_regress to be a little more subtle about this?
>
> Why exactly would we want it to not fail? Regression tests are not
> about papering over problems.

pg_regress needs to not install plpgsql into the data database on 9.0 when passed `--load-language=plpgsql`, because plpgsql will of course already be installed.

Unless you want all the third-party modules that depend on plpgsql for tests to somehow detect that they're going to run on 8.5a3 or later and not pass that option. But that'd be kind of a PITA. Much easier if pg_regress knows it doesn't need to install plpgsql.

Best,

David


--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: David Fetter on
On Thu, Feb 18, 2010 at 06:27:30PM -0500, Tom Lane wrote:
> David Fetter <david(a)fetter.org> writes:
> > While hacking on PL/Parrot, I ran across an issue where when
> > trying to load PL/pgsql, it's done unconditionally and fails. How
> > do we fix pg_regress to be a little more subtle about this?
>
> Why exactly would we want it to not fail? Regression tests are not
> about papering over problems.

OK, I know it's late, but having PL/pgsql on by default has caused an
unforeseen need: --require-language.

Please find enclosed a patch which implements this.

Cheers,
David.
--
David Fetter <david(a)fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter(a)gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From: Euler Taveira de Oliveira on
David Fetter escreveu:
> OK, I know it's late, but having PL/pgsql on by default has caused an
> unforeseen need: --require-language.
>
Why? IMHO pg_regress should be used with the same postgres version it was
built with. So any tests that use --load-language=plpgsql should be fixed.
Besides we could patch pg_regress.c to ignore loading plpgsql language into
the database (instead of adding another parameter -- we already have too many
options).


--
Euler Taveira de Oliveira
http://www.timbira.com/

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: David Fetter on
On Fri, Feb 19, 2010 at 12:26:29AM -0200, Euler Taveira de Oliveira wrote:
> David Fetter escreveu:
> > OK, I know it's late, but having PL/pgsql on by default has caused
> > an unforeseen need: --require-language.
> >
> Why? IMHO pg_regress should be used with the same postgres version
> it was built with. So any tests that use --load-language=plpgsql
> should be fixed. Besides we could patch pg_regress.c to ignore
> loading plpgsql language into the database (instead of adding
> another parameter -- we already have too many options).

Any external projects will fail on this if they're attempting to
support both pre-9.0 and post-9.0 PostgreSQLs. David Wheeler has
suggested that we special-case PL/pgsql for 9.0 and greater, as it's
in template0, where those tests are based.

Cheers,
Another David.
--
David Fetter <david(a)fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter(a)gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers