Re: Refactor ECPGconnect and allow IPv6 connection

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "wangsh(dot)fnst(at)fujitsu(dot)com" <wangsh(dot)fnst(at)fujitsu(dot)com>, 'PostgreSQL-development' <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Refactor ECPGconnect and allow IPv6 connection
Date: 2021-06-18 06:59:32
Message-ID: YMxEVCGhiKTgwobi@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 05, 2021 at 01:56:38AM +0000, kuroda(dot)hayato(at)fujitsu(dot)com wrote:
> I reviewed for myself and fixed something:
>
> * refactor parse_options(), same as conninfo_uri_parse_params() in libpq
> Skipping blanks is needed in this functions because ecpg precompiler add additional blanks
> between option parameters. I did not fix precompiler because of the compatibility.
> If it changes, maybe SO_MAJOR_VERSION will be also changed.
> * update doc

As you are writing in your first bullet point and as mentioned
upthread, it does not strike me as a great idea to have a duplicate
logic doing the parsing of URIs, even if libpq accepts multiple
hosts/ports as an option. Couldn't we have a better consolidation
here?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-06-18 08:26:03 Re: pgbench bug candidate: negative "initial connection time"
Previous Message Takashi Menjo 2021-06-18 06:44:54 Re: Map WAL segment files on PMEM as WAL buffers