Testing an extension against multiple versions of Postgresql

Started by Rhys A.D. Stewartover 6 years ago4 messagesgeneral
Jump to latest
#1Rhys A.D. Stewart
rhys.stewart@gmail.com

Greetings All,

I have both postgresql versions 10 and 11 installed on my box. I'm working
on an extension and just realized that 'make install' installs the
extension to the 11 server, but 'make installcheck' runs against the 10
server (I had previously installed the extension there).

Running psql without specifying a host or port connects me to the 10
server, so I suspect that both make installcheck and psql are doing similar
things with respect to connecting to a default server.

So the questions are:
Can I have make install & make installcheck run against multiple versions
at the same time or how do I tell the installcheck to run against the 11
server.

Thanks.

Rhys
Peace & Love | Live Long & Prosper

#2Ian Lawrence Barwick
barwick@gmail.com
In reply to: Rhys A.D. Stewart (#1)
Re: Testing an extension against multiple versions of Postgresql

On 7/13/19 10:55 AM, Rhys A.D. Stewart wrote:

Greetings All,

I have both postgresql versions 10 and 11 installed on my box. I'm working on an extension and just realized that 'make install' installs the extension to the 11 server, but 'make installcheck' runs against the 10 server (I had previously installed the extension there).

Running psql without specifying a host or port connects me to the 10 server, so I suspect that both make installcheck and psql are doing similar things with respect to connecting to a default server.

So the questions are:
Can I have make install & make installcheck run against multiple versions at the same time or how do I tell the installcheck to run against the 11 server.

Try setting relevant environment variables [*] for the target version before running "make installcheck".

[*] https://www.postgresql.org/docs/current//libpq-envars.html

Regards

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#3Luca Ferrari
fluca1978@gmail.com
In reply to: Ian Lawrence Barwick (#2)
Re: Testing an extension against multiple versions of Postgresql

On Sat, Jul 13, 2019 at 8:03 AM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:

So the questions are:
Can I have make install & make installcheck run against multiple versions at the same time or how do I tell the installcheck to run against the 11 server.

Try setting relevant environment variables [*] for the target version before running "make installcheck".

[*] https://www.postgresql.org/docs/current//libpq-envars.html

Aside that, a possible easy way to test something against different
PostgreSQL instance is to use something like pgenv
<https://github.com/theory/pgenv&gt;, that is for instance used to test
sqitch.

Luca

#4Rhys A.D. Stewart
rhys.stewart@gmail.com
In reply to: Luca Ferrari (#3)
Re: Testing an extension against multiple versions of Postgresql

Thanks!!

Rhys
Peace & Love|Live Long & Prosper

On Sat, Jul 13, 2019 at 3:15 AM Luca Ferrari <fluca1978@gmail.com> wrote:

Show quoted text

On Sat, Jul 13, 2019 at 8:03 AM Ian Barwick <ian.barwick@2ndquadrant.com>
wrote:

So the questions are:
Can I have make install & make installcheck run against multiple

versions at the same time or how do I tell the installcheck to run against
the 11 server.

Try setting relevant environment variables [*] for the target version

before running "make installcheck".

[*] https://www.postgresql.org/docs/current//libpq-envars.html

Aside that, a possible easy way to test something against different
PostgreSQL instance is to use something like pgenv
<https://github.com/theory/pgenv&gt;, that is for instance used to test
sqitch.

Luca