Re: Extensions, this time with a patch - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Extensions, this time with a patch
Date
Msg-id m2wrpad1fo.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Extensions, this time with a patch  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Extensions, this time with a patch
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: patch: format function, next generation
Next
From: Dimitri Fontaine
Date:
Subject: Re: Extensions, this time with a patch