Re: pgsql: Add better handling of redundant IS [NOT] NULL quals
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: pgsql: Add better handling of redundant IS [NOT] NULL quals |
| Дата | |
| Msg-id | 4071562.1706038734@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: pgsql: Add better handling of redundant IS [NOT] NULL quals (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Список | pgsql-hackers |
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2024-Jan-23, David Rowley wrote:
>> Until now PostgreSQL has not been very smart about optimizing away IS
>> NOT NULL base quals on columns defined as NOT NULL.
> Hmm, what happens if a NOT NULL constraint is dropped and you have such
> a plan in plancache? As I recall, lack of a mechanism to invalidate
> such plans was the main reason for Postgres not to have this.
IIRC, we realized that that concern was bogus. Removal of such
constraints would cause pg_attribute.attnotnull to change, leading
to a relcache invalidation on the table, forcing replan. If anyone
tried to get rid of attnotnull or make it incompletely reliable,
then we'd have problems; but AFAIK that's not being contemplated.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера