Peter/Fabien,

Just to say thank you for all your hard work in getting pgxs working in
CVS. I've successfully managed to get a contrib module to build outside
of the source tree, which will help simplify a lot of things.

I have one question though: the comments in pgxs.mk suggested that I
needed to do the following to include the pgxs.mk:

# Use the following layout for your Makefile:
#
#   [variable assignments, see below]
#   [custom rules, rarely necessary]
#
#   PGXS := $(shell pg_config --pgxs)
#   include $(PGXS)


However, on my CVS version from about an hour ago, I needed to change
this to:

	PGXS := $(shell pg_config --pgxs)/src/makefiles/pgxs.mk
	include $(PGXS)

This is because I only get the pgxs directory returned by "pgconfig
--pgxs" as opposed to the path to the pgxs.mk file itself - is that the
correct thing to do (i.e. the comment is wrong?) or is "pgconfig --pgxs"
returning the wrong thing?


Kind regards,

Mark.

---

Mark Cave-Ayland
Webbased Ltd.
Tamar Science Park
Derriford
Plymouth
PL6 8BX
England

Tel: +44 (0)1752 764445
Fax: +44 (0)1752 764446


This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender. You
should not copy it or use it for any purpose nor disclose or distribute
its contents to any other person.



Wed, 4 Aug 2004 11:21:43 +0100
"Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk>
Re: pgxs: build infrastructure for extensions v4


Mark Cave-Ayland wrote:

>Peter/Fabien,
>
>Just to say thank you for all your hard work in getting pgxs working in
>CVS. I've successfully managed to get a contrib module to build outside
>of the source tree, which will help simplify a lot of things.
>
>I have one question though: the comments in pgxs.mk suggested that I
>needed to do the following to include the pgxs.mk:
>
># Use the following layout for your Makefile:
>#
>#   [variable assignments, see below]
>#   [custom rules, rarely necessary]
>#
>#   PGXS := $(shell pg_config --pgxs)
>#   include $(PGXS)
>
>
>However, on my CVS version from about an hour ago, I needed to change
>this to:
>
>	PGXS := $(shell pg_config --pgxs)/src/makefiles/pgxs.mk
>	include $(PGXS)
>
>This is because I only get the pgxs directory returned by "pgconfig
>--pgxs" as opposed to the path to the pgxs.mk file itself - is that the
>correct thing to do (i.e. the comment is wrong?) or is "pgconfig --pgxs"
>returning the wrong thing?
>
>
>
>  
>

needs to be fixed in pg_config.c I think - should be a one-liner.

cheers

andrew

Wed, 04 Aug 2004 08:21:26 -0400
Andrew Dunstan <andrew@dunslane.net>
Re: pgxs: build infrastructure for extensions v4
Andrew Dunstan wrote:
> Mark Cave-Ayland wrote:
>> This is because I only get the pgxs directory returned by "pgconfig
>> --pgxs" as opposed to the path to the pgxs.mk file itself - is that the
>> correct thing to do (i.e. the comment is wrong?) or is "pgconfig --pgxs"
>> returning the wrong thing?
> 
> needs to be fixed in pg_config.c I think - should be a one-liner.

If the attached looks correct I'll apply it.

Joe
Wed, 04 Aug 2004 11:03:24 -0700
Joe Conway <mail@joeconway.com>
Re: pgxs: build infrastructure for extensions v4

FYI, I couldn't find anything in the shell pg_config with this path:

        strncat(otherpath, "/pgxs/src/makefiles/pgxs.mk", MAXPGPATH-1);

Did you find a mention of this?  I looked in pg_config.sh and
Makefile.global.in.

I am not saying your change is wrong, just that it is new, I think.

---------------------------------------------------------------------------

Joe Conway wrote:
> Andrew Dunstan wrote:
> > Mark Cave-Ayland wrote:
> >> This is because I only get the pgxs directory returned by "pgconfig
> >> --pgxs" as opposed to the path to the pgxs.mk file itself - is that the
> >> correct thing to do (i.e. the comment is wrong?) or is "pgconfig --pgxs"
> >> returning the wrong thing?
> > 
> > needs to be fixed in pg_config.c I think - should be a one-liner.
> 
> If the attached looks correct I'll apply it.
> 
> Joe


> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 6 Aug 2004 00:25:06 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: pgxs: build infrastructure for extensions v4
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> FYI, I couldn't find anything in the shell pg_config with this path:
>         strncat(otherpath, "/pgxs/src/makefiles/pgxs.mk", MAXPGPATH-1);
> Did you find a mention of this?  I looked in pg_config.sh and
> Makefile.global.in.

The original coding concatenated "src/makefiles/pgxs.mk" to a path value
derived elsewhere (pgxsdir).  I was planning to bug Peter about just how
correct this patch is --- it's essentially hardwiring an assumption
about the construction of pgxsdir.

			regards, tom lane

Fri, 06 Aug 2004 01:02:37 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: pgxs: build infrastructure for extensions v4 
Bruce Momjian wrote:
> FYI, I couldn't find anything in the shell pg_config with this path:
> 
>         strncat(otherpath, "/pgxs/src/makefiles/pgxs.mk", MAXPGPATH-1);
> 
> Did you find a mention of this?  I looked in pg_config.sh and
> Makefile.global.in.

I see it here:
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/bin/pg_config/Attic/pg_config.sh.diff?r1=1.9;r2=1.10

      --pkglibdir)    show="$show \$val_pkglibdir";;
+    --pgxs)         show="$show \$val_pgxsdir/src/makefiles/pgxs.mk";;
      --configure)    show="$show \$val_configure";;

Joe

Thu, 05 Aug 2004 22:03:33 -0700
Joe Conway <mail@joeconway.com>
Re: pgxs: build infrastructure for extensions v4
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 
>>FYI, I couldn't find anything in the shell pg_config with this path:
>>        strncat(otherpath, "/pgxs/src/makefiles/pgxs.mk", MAXPGPATH-1);
>>Did you find a mention of this?  I looked in pg_config.sh and
>>Makefile.global.in.
> 
> 
> The original coding concatenated "src/makefiles/pgxs.mk" to a path value
> derived elsewhere (pgxsdir).  I was planning to bug Peter about just how
> correct this patch is --- it's essentially hardwiring an assumption
> about the construction of pgxsdir.
> 

I just added "src/makefiles/pgxs.mk" to the already hardwired path to 
pgxs in pg_config.c. But in any case, it looks like pgxsdir is set in 
src/Makefile.global.in like like this:
   pgxsdir = $(pkglibdir)/pgxs
So it is sort of hardwired already at the moment at least.

Joe


Thu, 05 Aug 2004 22:14:47 -0700
Joe Conway <mail@joeconway.com>
Re: pgxs: build infrastructure for extensions v4

Oh, I see that modification now.  Thanks.  Sorry I missed it.

---------------------------------------------------------------------------

Joe Conway wrote:
> Bruce Momjian wrote:
> > FYI, I couldn't find anything in the shell pg_config with this path:
> > 
> >         strncat(otherpath, "/pgxs/src/makefiles/pgxs.mk", MAXPGPATH-1);
> > 
> > Did you find a mention of this?  I looked in pg_config.sh and
> > Makefile.global.in.
> 
> I see it here:
> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/bin/pg_config/Attic/pg_config.sh.diff?r1=1.9;r2=1.10
> 
>       --pkglibdir)    show="$show \$val_pkglibdir";;
> +    --pgxs)         show="$show \$val_pgxsdir/src/makefiles/pgxs.mk";;
>       --configure)    show="$show \$val_configure";;
> 
> Joe
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 6 Aug 2004 11:37:58 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: pgxs: build infrastructure for extensions v4