Re: Extensions, this time with a patch

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

Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> I lean toward adding support for a script variable into the control file
> which defaults to script = '${name}.sql' and will have to be edited only
> in those 3 cases you're reporting about. I'm going to work on that this
> morning, it looks simple enough to get reworked if necessary.
>
> (yes it means we have to scan all control files to find the one where
> the name property is the one given in the CREATE EXTENSION command,
> but the code already exists --- it still has to be refactored)

That's done now and for those paying attention, of course those examples
won't need to add a script property in their control files, as soon as
we both scan the SHAREDIR to find the proper control file and that the
default script is ${name}.sql, which is what's used everywhere in our
contribs.

New patch to follow later, including the other modifications on the
table (error message, script file encoding, etc).

Note that the control files being parsed to check their name property
against the extension name that's been asked by the user, I think that
means they have to be in a fixed known encoding.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-10-22 09:56:20 Re: Extensions, this time with a patch
Previous Message Pavel Stehule 2010-10-22 08:48:17 patch: format function, next generation