Re: PGXS: REGRESS_OPTS=--load-language=plpgsql

From: David Fetter <david(at)fetter(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
Date: 2010-02-22 02:06:15
Message-ID: 20100222020615.GD2917@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 18, 2010 at 01:51:08PM -0800, David Fetter wrote:
> Folks,
>
> 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?

For now, and for the archives, I've come up with this ugly hack:

REGRESS_OPTS = --dbname=$(PL_TESTDB)
NEEDS_PLPGSQL = $(shell psql -Atc "SELECT setting::int < 90000 FROM pg_catalog.pg_settings WHERE name='server_version_num'")
ifeq ($(NEEDS_PLPGSQL), "t")
REGRESS_OPTS += $(if $PG_VERSION < 90000," --load-language=plpgsql", "")
endif

That works all the way back to 8.2, and to be honest, I'm not all that
interested in making something that will work further back than that,
especially for new projects.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-02-22 02:30:58 Re: pgsql: Oops, don't forget to rewind the directory before scanning it to
Previous Message Bruce Momjian 2010-02-22 00:23:34 Re: PGXS: REGRESS_OPTS=--load-language=plpgsql