Re: Fix PQport to never return NULL if the connection is valid
Daniele Varrazzo <daniele.varrazzo@gmail.com>
From: Daniele Varrazzo <daniele.varrazzo@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-05-08T17:38:36Z
Lists: pgsql-hackers
On Thu, 8 May 2025 at 18:58, Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote: > I have prepared a patch, which is attached, to fix the issue. However > the patch returns the default port in case of no info in > 'conn->connhost'. Ah, of course this is wrong if the PGPORT env var is set and I assume thanks to the pg_service... If I understand better what to return and the strategy to return it I can try and provide a better patch. Cheers -- Daniele
Commits
-
Fix PQport to never return NULL unless the connection is NULL.
- d5cba774626f 14.19 landed
- 9dcd1aa815f5 13.22 landed
- a372a64db794 15.14 landed
- 3f10d2b66544 17.6 landed
- 009c20a3da5a 16.10 landed
- daf9bdc47d11 19 (unreleased) landed
- bfa9b25c94fe 18.0 landed