Re: pgsql: psql: fix \connect with URIs and conninfo strings

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: psql: fix \connect with URIs and conninfo strings
Date: 2015-04-02 02:56:46
Message-ID: CAB7nPqRgTJW0N3JuPqNeG5yB9uhrTH-V-kuz+yn9VwDZtEuTSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Apr 2, 2015 at 11:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> > The patch attached fixes all those inconsistencies (tested build on OSX
> and
> > Windows).
>
> I think this is going in the wrong direction entirely, ie doubling down
> on Alvaro's original mistake. libpq *must not* depend on libpgcommon,
> because the latter is not compiled to be position-independent code
> (on machines where that matters).
>

Hm, OK. I was not aware of that.

> Furthermore, proposing to add this:
>
> +#ifndef FRONTEND
> +#error "This file is not expected to be compiled for backend code"
> +#endif
>
> seems to me to prove that connstrings.c didn't belong in src/common
> in the first place.
>
> I'm too tired to think through exactly what this should be like instead,
> but we do have rules about what goes where, and the response to violating
> those rules should not be to break down the divisions even more.
>

libpgport sounds like the only place then. I guess that it would be right
to revert this patch on master and replace it with a version similar to
what has been done in backbranches for now, and look again at this
refactoring stuff...
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2015-04-02 11:52:09 pgsql: Correct comment to use RS_EPHEMERAL
Previous Message Tom Lane 2015-04-02 02:49:07 Re: pgsql: psql: fix \connect with URIs and conninfo strings