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 <da...@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fet...@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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to