Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types
Date
Msg-id 20180326132350.GG2759@paquier.xyz
Whole thread Raw
In response to Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-hackers
On Mon, Mar 26, 2018 at 11:39:51PM +1100, Haribabu Kommi wrote:
> And if we are not going to change the above, then PQhost() function
> returns 3 values,
> - NULL when the conn==NULL
> - Actual host or hostaddr of the active connection
> - Empty string when the conn is not able to evaluate.
>
> Is it fine to proceed like above?

Yeah, I would think that this is a sensible approach.  Keeping
consistent with NULL is good for the other function, and we still need a
way to identify the dont-know state.  Peter, what's your input on that?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Parallel Aggregates for string_agg and array_agg
Next
From: David Steele
Date:
Subject: Re: Re: WIP: Covering + unique indexes.