From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Evaluate expression at planning time for two more cases |
Date: | 2020-08-27 12:31:15 |
Message-ID: | CALAY4q_Wazcha2f0kpd=zVh7bwfC=txF_n2XVdvmRmGCS+pWeQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
null_check_on_pkey_optimization_v1.patch | text/x-patch | 9.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Grigory Smolkin | 2020-08-27 13:02:44 | history file on replica and double switchover |
Previous Message | Amit Kapila | 2020-08-27 12:12:49 | Re: Parallel copy |