Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...
Дата
Msg-id 20200908145618.GA14279@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
On 2020-Sep-08, Laurenz Albe wrote:

> We should at least have
> 
>   ALTER TABLE ... ADD PRIMARY KEY (id) INCLUDE (val);
> 
> or something before we consider this patch.

Agreed.

Now the trick in this new command is to let the user change the included
columns afterwards, which remains useful (since it's clearly reasonable
to change minds after applications using the constraint start to take
shape).

> As to the information_schema, that could pretend that the INCLUDE
> columns just don't exist.

Yeah, that's what I was thinking too, since for all intents and
purposes, from the standard's POV the constraint works the same
regardless of included columns.

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



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal - reference to plpgsql_check from plpgsql doc