Re: using index or check in ALTER TABLE SET NOT NULL

Поиск
Список
Период
Сортировка
От Sergei Kornilov
Тема Re: using index or check in ALTER TABLE SET NOT NULL
Дата
Msg-id 2091981520364460@web24g.yandex.ru
обсуждение исходный текст
Ответ на Re: using index or check in ALTER TABLE SET NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello

> Do you actually need test output proving that this code path was taken
> rather than the default one? Seems like looking at the code coverage
> report might be enough.
I not known. In v4 i use DEBUG1 message and do not check code path in tests at all: by full table scan or by
constraint,i tested only command result to not break behavior.
 
Today Ildar Musin proposed to test code path through NotNullImpliedByRelConstraints function. This is my first patch
andI do not have the confidence to write a test. So I looked more closely at the alter table tests, found several info
inattach partition and updated my patch.
 

> I did not see any INFO messages in a quick test of ALTER TABLE ATTACH
> PARTITION, but if there are any lurking in there, they probably need
> to be downgraded.
In src/test/regress/expected/alter_table.out i found 7 test with
> INFO: partition constraint for table "..." is implied by existing constraints
and 5 with
> INFO:  updated partition constraint for default partition "..." is implied by existing constraints
ereport's are in ValidatePartitionConstraints function src/backend/commands/tablecmds.c

regards, Sergei


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: using index or check in ALTER TABLE SET NOT NULL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: constraint exclusion and nulls in IN (..) clause