pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST