ECPG installcheck tests fail if PGDATABASE is set

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: ECPG installcheck tests fail if PGDATABASE is set
Date: 2018-03-18 20:55:48
Message-ID: 20180318205548.2akxjqvo7hrk5wbc@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I got a bit confused running installcheck-world and seeing ecpg
failures like:
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <DEFAULT> for user regress_ecpg_user2
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: could not open database: FATAL: database "regress_ecpg_user2" does not exist
-
-[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode -402 on line 43: could not connect to database "<DEFAULT>" on line 43
-[NO_PID]: sqlca: code: -402, state: 08001
-[NO_PID]: raising sqlcode -220 on line 44: connection "main" does not exist on line 44
-[NO_PID]: sqlca: code: -220, state: 08003
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1

A bit of pondering pointed me towards my environment's
PGDATABASE=postgres being to blame. Unsetting that makes the test
succeed.

Do we consider that an unsupported configuration? It seems like a
fairly reasonable thing to want to support imo.

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2018-03-18 20:56:12 Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility
Previous Message Dmitry Dolgov 2018-03-18 20:42:14 jsonb nesting level edge case