Re: BUG #13126: table constraint loses its comment

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: BUG #13126: table constraint loses its comment
Дата
Msg-id 5596A36D.4030008@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: BUG #13126: table constraint loses its comment  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: BUG #13126: table constraint loses its comment  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
On 2015-07-03 15:50, Michael Paquier wrote:
> On Thu, Jul 2, 2015 at 11:16 PM, Petr Jelinek <petr@2ndquadrant.com> wrote:
>> I was going through the code and have few comments:
>> - Why do you change the return value of TryReuseIndex? Can't we use reuse
>> the same OidIsValid(stmt->oldNode) check that ATExecAddIndex is doing
>> instead?
>
> As pointed out by Heikki previously, that is actually unnecessary,
> comments are still lost even if the index is reused for constraints.
> So perhaps for simplicity we could just unconditionally recreate the
> comments all the time if they are available.
>

Ah ok, I missed Heikki's email.

>> - I think the changes to ATPostAlterTypeParse should follow more closely the
>> coding of transformTableLikeClause - namely use the idxcomment
>
> I am not sure I follow here. Could you elaborate?
>

Well for indexes you don't really need to add the new AT command, as 
IndexStmt has char *idxcomment which it will automatically uses as 
comment if not NULL. While  I am not huge fan of the idxcomment it 
doesn't seem to be easy to remove it in the future and it's what 
transformTableLikeClause uses so it might be good to be consistent with 
that.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13481: No config folder upon installation
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: PQexec() hangs on OOM