Re: extension_control_path

Поиск
Список
Период
Сортировка
От Sergey Muraviov
Тема Re: extension_control_path
Дата
Msg-id CAJTaR333_UWTGwdyshDNM4jgQmFV2wmbbBBYt5dyfZjynf4qCw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: extension_control_path  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: extension_control_path  (Magnus Hagander <magnus@hagander.net>)
Re: extension_control_path  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
Hi

Now patch applies cleanly and works. :-)

But I have some notes:

1. There is an odd underscore character in functions find_in_extension_control_path and list_extension_control_paths:
\"extension_control__path\""

2. If we have several versions of one extension in different directories (which are listed in extension_control_path parameter) then we
get strange output from pg_available_extensions and pg_available_extension_versions views (Information about extension, whose path is at the beginning of the list, is duplicated). And only one version of the extension can be created.

See examples:
/extensions/
├── postgis-2.0.4
│   ├── postgis--2.0.4.sql
│   └── postgis.control
└── postgis-2.1.1
    ├── postgis--2.1.1.sql
    └── postgis.control

=================================================

postgresql.conf:
   extension_control_path = '/extensions/postgis-2.0.4:/extensions/postgis-2.1.1'

postgres=# table pg_catalog.pg_available_extensions;
  name   | default_version | installed_version |                               comment                               
---------+-----------------+-------------------+---------------------------------------------------------------------
 postgis | 2.0.4           |                   | PostGIS geometry, geography, and raster spatial types and functions
 postgis | 2.0.4           |                   | PostGIS geometry, geography, and raster spatial types and functions
(2 rows)

postgres=# table pg_catalog.pg_available_extension_versions;
  name   | version | installed | superuser | relocatable | schema | requires |                               comment                               
---------+---------+-----------+-----------+-------------+--------+----------+---------------------------------------------------------------------
 postgis | 2.0.4   | f         | t         | t           |        |          | PostGIS geometry, geography, and raster spatial types and functions
 postgis | 2.0.4   | f         | t         | t           |        |          | PostGIS geometry, geography, and raster spatial types and functions
(2 rows)


=================================================

postgresql.conf:
   extension_control_path = '/extensions/postgis-2.1.1:/extensions/postgis-2.0.4'

postgres=# table pg_catalog.pg_available_extensions;
  name   | default_version | installed_version |                               comment                               
---------+-----------------+-------------------+---------------------------------------------------------------------
 postgis | 2.1.1           |                   | PostGIS geometry, geography, and raster spatial types and functions
 postgis | 2.1.1           |                   | PostGIS geometry, geography, and raster spatial types and functions
(2 rows)

postgres=# create extension postgis;
CREATE EXTENSION

postgres=# SELECT PostGIS_version();
            postgis_version            
---------------------------------------
 2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)

postgres=# table pg_catalog.pg_available_extensions;
  name   | default_version | installed_version |                               comment                               
---------+-----------------+-------------------+---------------------------------------------------------------------
 postgis | 2.1.1           | 2.1.1             | PostGIS geometry, geography, and raster spatial types and functions
 postgis | 2.1.1           | 2.1.1             | PostGIS geometry, geography, and raster spatial types and functions
(2 rows)

3. It would be fine to see an extension control path in pg_available_extensions and pg_available_extension_versions views (in separate column or within of extension name).
 
4. Perhaps the CREATE EXTENSION command should be improved to allow creation of the required version of the extension. 
So we can use different versions of extensions in different databases.

PS
Sorry for my English.

2014/1/24 Fabrízio de Royes Mello <fabriziomello@gmail.com>

On Fri, Jan 24, 2014 at 6:57 AM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
>
> Sergey Muraviov <sergey.k.muraviov@gmail.com> writes:
> > I can't apply the patch.
>
> Did you try using the `patch`(1) command?
>
> The PostgreSQL project policy is to not use the git format when sending
> patches to the mailing list, prefering the context diff format. So you
> need to resort to using the basic patch commands rather than the modern
> git tooling. See also:
>
>   http://wiki.postgresql.org/wiki/Submitting_a_Patch
>
>     Patches must be in a format which provides context (eg: Context
>     Diff); 'normal' or 'plain' diff formats are not acceptable.
>

Would be nice if we can use "git apply" command...

:-)

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello



--
Best regards,
Sergey Muraviov

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: UNION ALL on partitioned tables won't use indices.
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Why do we let autovacuum give up?