Re: What generates pg_config.h?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Travis Allison <travisallison(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, floriparob(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org, Christoph Berg <myon(at)debian(dot)org>
Subject: Re: What generates pg_config.h?
Date: 2018-01-06 15:24:28
Message-ID: 67591f85-a910-2e0b-1fdd-9c774eacd65f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/05/2018 09:36 PM, Travis Allison wrote:
> Tom, I guess I don't understand the point of having a different
> pg_config.h in my user/include/postgresql directory than the postgresql
> server that I am running.  You mentioned building client code that would
> reference the pg_config.h in user/include/postgresql.  A couple of
> questions:
>
> What type of client code are you referring to?
> What is the point of having a pg_config.h for a server that I am not
> even running?

Not Tom, but to answer:

As to client code, that would include the Postgres CLI client psql or
the Python adapter psycopg2 among others. This code does not need to be
on the server machine, it can be anywhere you want a client to connect
to a Postgres server.

The point of a more recent pg_config.h is that client code compiled with
it would be backwards compatible whereas compiling against an older
version would result in code that would not work against newer servers.

The problem you are running into is that the build process is using both
the older(9.6.5) and newer(10.0) pg_config.h at the same time.

>
> Travis
>
>
>
>
>
> On Fri, Jan 5, 2018 at 8:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
> Travis Allison <travisallison(at)gmail(dot)com
> <mailto:travisallison(at)gmail(dot)com>> writes:
> > I suppose an easy workaround is to copy my version 9.6 pg_config.h into my
> > user/include/postgresql directory and replace the one installed by
> > libpq-dev.
>
> > Can you think of any detrimental side-effects from doing that?
>
> I would not recommend that: it's likely to break code that's expecting
> the Ubuntu-standard layout.  I think your best course is to adapt the
> particular package you're having trouble with to work with that layout.
> Maybe contact its author for help?
>
>                         regards, tom lane
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Berg 2018-01-06 15:42:43 Re: What generates pg_config.h?
Previous Message Marco Nenciarini 2018-01-06 14:40:58 Re: [PATCH] Logical decoding of TRUNCATE