Re: Review: create extension default_full_version

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Review: create extension default_full_version
Дата
Msg-id m28v9dyij9.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Review: create extension default_full_version  (Ibrar Ahmed <ibrar.ahmad@gmail.com>)
Ответы Re: Review: create extension default_full_version
Список pgsql-hackers
Ibrar Ahmed <ibrar.ahmad@gmail.com> writes:
> I am still getting the same error message.

With the attached patch (v2), it works well:

create extension hstore version '1.2' from 'unpackaged';
DEBUG:  execute_extension_script: '/Users/dim/pgsql/ddl/share/extension/hstore--unpackaged--1.0.sql'
DEBUG:  execute_extension_script: '/Users/dim/pgsql/ddl/share/extension/hstore--1.0--1.1.sql'
DEBUG:  execute_extension_script: '/Users/dim/pgsql/ddl/share/extension/hstore--1.1--1.2.sql'
CREATE EXTENSION

You have to remember that the spelling FROM 'unpackaged version' really
means that we have previously installed a "loose" version of the
extension (just \i hstore.sql) and want to apply the upgrade path from
there.

We can't have FROM meaning the same thing as default_full_version.

> With default_full_version = '1.1'
> --------------------------------------------
> postgres=# CREATE EXTENSION hstore version '1.3' from '1.1';
> DEBUG:  execute_extension_script:
> '/usr/local/pgsql/share/extension/hstore--1.1.sql'
> DEBUG:  execute_extension_script:
> '/usr/local/pgsql/share/extension/hstore--1.1--1.3.sql'
> *ERROR:  could not stat file
> "/usr/local/pgsql/share/extension/hstore--1.1--1.3.sql": No such file or
> directory*

That's nonetheless a bug and is fixed now:

-    if (pcontrol->default_full_version)
+    if (pcontrol->default_full_version && !unpackaged)


See attached.

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


Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Tablespaces in the data directory
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Review: Extra Daemons / bgworker