Re: Extensions, this time with a patch

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions, this time with a patch
Date: 2010-10-21 08:15:05
Message-ID: m2sk00ynau.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> writes:
> Why does only hstore have version '9.1'? Any other modules have
> '9.1devel'.

It's the only contrib that's not using PGXS but instead directly
includes $(top_builddir)/src/Makefile.global, and that file contains the
following:

# PostgreSQL version number
VERSION = 9.1devel
MAJORVERSION = 9.1

Then in contrib/hstore/Makefile we have VERSION = $(MAJORVERSION) and
that's what get used to build the control file.

We could decide to "fix" hstore Makefile to look more like all the other
ones in contrib, but I don't think that directly falls in the scope of
the extension's patch. I could provide a separate patch to this end,
that said.

> How about having *.control.in and replace magic keywords in them at "make"?
> "make install" won't modify files at all, and "make clean" just removes
> *.control. It is the way we're using for *.sql.in and MODULE_PATHNAME.

Thanks a lot for that idea, it's obvious now that you say it. Maybe I
should stop working (or posting patches) that late in the evening :)

It's done in the v8 patch, as always based on the git repository:
http://git.postgresql.org/gitweb?p=postgresql-extension.git;a=shortlog;h=refs/heads/extension

As I think we're now on the right track about PGXS integration of the
feature, I went ahead and added documentation about EXTENSION and
VERSION.

> I found xml2/pgxml.control should have 'pgxml" for the name.

Well really I'm not sure about this one. As Tom said there's no need for
the extension's name to be the same as its directory or even file
names. That's why there's a 'name' property in the control file, after
all.

Now it could be that we want to clean this up in contrib, but that's out
of the extension's patch scope in my mind.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Attachment Content-Type Size
extension.v8.patch.gz application/octet-stream 42.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-10-21 09:12:41 Re: How to reliably detect if it's a promoting standby
Previous Message Dimitri Fontaine 2010-10-21 07:33:31 Re: Extensions, this time with a patch