Skip site navigation (1) Skip section navigation (2)

Re: Frustrating issue with PGXS

From: Fabien COELHO <fabien(dot)coelho(at)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>,Eddie Stanley <eddiewould(at)paradise(dot)net(dot)nz>,PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>,mux(at)elvis(dot)mu(dot)org
Subject: Re: Frustrating issue with PGXS
Date: 2007-06-26 11:11:41
Message-ID: Pine.LNX.4.64.0706260858010.8254@briare.cri.ensmp.fr (view raw or flat)
Thread:
Lists: pgsql-hackers
>> With the assumption that the above "that one" refered to the "PG_CONFIG"
>> macro definition in "Makefile.global". As existing extension makefiles do
>> not defined PG_CONFIG, relying on one would break them wrt future
>> releases?
>
> Ah, I see.  I was thinking in terms of breaking them intentionally ;-)

Well, if that is what you want, is was perfect:-)

But ISTM that the remedy (breaking all past makefiles for all extensions) 
is not worth the issue.

A better documentation, and possibly following your suggestion with an 
explicit PG_CONFIG in contrib makefiles, but without breaking existing 
extensions seems quite enough. The error made by Eddie is legitimate, but
it is also something rare, it did not come up in the last two years.

Please find attached a small patch which enhances the documentation on the 
issue in my broken English.

> If we're worrying about cross-version compatibility then it seems there
> isn't any really nice way to make both combinations do the ideal thing.
> If someone has an updated module Makefile, ie,
>
> PG_CONFIG := pg_config
> PGXS := $(shell $(PG_CONFIG) --pgxs)
> include $(PGXS)
>
> then it will look like changing PG_CONFIG in the Makefile would work; 
> but that will not work with an older PG release, because Makefile.global 
> will override the value.

Okay, there are indeed two different compatibility issues :
  - "old" makefiles with possibly "new" pgxs conventions
  - possibly "new" makefiles with "old" pgxs conventions

Indeed for "old" Makefile.global the PG_CONFIG is overwritten.

It would be okay if it is made clear that the PG_CONFIG macro MUST not be 
updated from within the Makefile, but just from the commande line ?

Well that's still a little bit error prone anyway.

ISTM that the documentation update would suffice.

-- 
Fabien.

Attachment: pgxs_doc.patch
Description: text/x-diff (2.1 KB)

In response to

Responses

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2007-06-26 11:19:22
Subject: pgstat_drop_relation bugfix
Previous:From: ITAGAKI TakahiroDate: 2007-06-26 10:40:48
Subject: HOT: Incomplete issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group