Evaluate expression at planning time for two more cases - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Evaluate expression at planning time for two more cases
Date
Msg-id CALAY4q_Wazcha2f0kpd=zVh7bwfC=txF_n2XVdvmRmGCS+pWeQ@mail.gmail.com
Whole thread Raw
Responses Re: Evaluate expression at planning time for two more cases  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Hi,

In good written query IS NULL and IS NOT NULL check on primary and non null constraints columns should not happen but if it is mentioned PostgreSQL have to be smart enough for not checking every return result about null value on primary key column. Instead it can be evaluate its truth value and set the result only once. The attached patch evaluate and set the truth value for null and not null check on primary column on planning time if the relation attribute is not mention on nullable side of outer join.

Thought?

regards

Surafel

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Parallel copy
Next
From: Grigory Smolkin
Date:
Subject: history file on replica and double switchover