Re: dealing with extension dependencies that aren't quite 'e'

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: dealing with extension dependencies that aren't quite 'e'
Дата
Msg-id 20160321152432.GA358168@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: dealing with extension dependencies that aren't quite 'e'  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Список pgsql-hackers
Abhijit Menon-Sen wrote:

> +    else if (strcmp(defel->defname, "extdepend") == 0)
> +    {
> +        if (*extdepend_item)
> +            goto duplicate_error;
> +
> +        *extdepend_item = defel;
> +    }
>      else
>          return false;
>  

I'm not sure I agree with this implementation.  I mentioned ALTER ..
SET SCHEMA and ALTER .. OWNER TO as examples because, since other object
types were mentioned as possible targets for this command, then this
should presumably object-type-agnostic, like those ALTER forms are.  So
IMO we shouldn't shoehorn this into AlterFunctionStmt but rather have
its own node AlterObjectDepends or similar.

The other point is that if we're doing it in ALTER FUNCTION which allows
multiple subcommands in one go, why do we not allow to run this command
for multiple extensions?  After all, it's not completely stupid to think
that one function could depend on multiple extensions, and so if you
agree with that then it's not completely stupid that it should be
possible to declare such in one command, i.e.

ALTER FUNCTION .. DEPENDS ON EXTENSION one, two; or perhaps
ALTER FUNCTION .. DEPENDS ON EXTENSION one, DEPENDS ON EXTENSION two;

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [patch] Proposal for \crosstabview in psql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [patch] Proposal for \crosstabview in psql