Re: assert pg_class.relnatts is consistent

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: assert pg_class.relnatts is consistent
Дата
Msg-id CACPNZCsf+u8w8QK0DBF4yB66A-dQTpJXqNr7cwnXYE6VVz87hA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: assert pg_class.relnatts is consistent  (John Naylor <john.naylor@2ndquadrant.com>)
Ответы Re: assert pg_class.relnatts is consistent  (John Naylor <john.naylor@2ndquadrant.com>)
Re: assert pg_class.relnatts is consistent  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I wrote:
> + elsif ($attname eq 'relnatts')
> + {
> + ;
> + }
>
> With your patch, I get this when running
> src/include/catalog/reformat_dat_file.pl:
>
> strip_default_values: pg_class.relnatts undefined
>
> Rather than adding this one-off case to AddDefaultValues and then
> another special case to strip_default_values, maybe it would be better
> to just add a placeholder BKI_DEFAULT(0) to pg_class.h, with a comment
> that it's just a placeholder.

One possible objection to what I wrote above is that it adds a
different kind of special case, but in a sneaky way. Perhaps it would
be more principled to treat it the same as oid after all. If we do
that, it would help to add a comment that we can't treat relnatts like
pronangs, since we need more information than what's in each pg_class
row.

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



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

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: logical decoding : exceeded maxAllocatedDescs for .spill files
Следующее
От: John Naylor
Дата:
Сообщение: Re: assert pg_class.relnatts is consistent