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 m2bp5ggzy0.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Extensions, this time with a patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Extensions, this time with a patch
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> the handling of relative vs absolute paths is bogus here.  I think it'd
> make more sense to have a bool "are we including"; and if that's false and
> the path is not absolute, then the file is relative to CWD; or maybe we
> make it absolute by prepending PGDATA; maybe something else?  (need to
> think of something that makes sense for both recovery.conf and extension
> control files)

Current coding in extensions prepend any control or script file with
sharepath, so that we're only dealing with absolute filename here. The
idea is that it's no business for any other part of the code to have to
know where we decide to install control and script files.

My feeling is that when !is_absolute_path(config_file) and calling_file
is NULL we should make the config_file absolute by prepending PGDATA.
Please find that done in attached v4 of the cfparser patch.

>> If that looks ok, do we want to add some documentation about the new
>> lexer capabilities?
>
> beyond extra code comments?  probably not.

Great.

>> Also, for what good reason would we want to prevent
>> people from using the include facility?
>
> Not sure about this

Ok, nothing special here.
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: visibility map
Next
From: Shigeru HANADA
Date:
Subject: Re: SQL/MED estimated time of arrival?