ECPG installcheck tests fail if PGDATABASE is set - Mailing list pgsql-hackers

From Andres Freund
Subject ECPG installcheck tests fail if PGDATABASE is set
Date
Msg-id 20180318205548.2akxjqvo7hrk5wbc@alap3.anarazel.de
Whole thread Raw
Responses Re: ECPG installcheck tests fail if PGDATABASE is set
List 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


pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: jsonb nesting level edge case
Next
From: Daniel Gustafsson
Date:
Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility