Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKGGr-0002Or-1l for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 10:11:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pKGGp-0001WA-N0 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 10:11:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKGGp-0001VB-C3 for pgsql-hackers@lists.postgresql.org; Tue, 24 Jan 2023 10:11:15 +0000 Received: from ma04-relay.lansolnet.com ([176.95.46.38]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKGGi-0004ai-5B for pgsql-hackers@lists.postgresql.org; Tue, 24 Jan 2023 10:11:11 +0000 Received: from unknown ([192.168.8.230]) by ma04-relay.lansolnet.com; Tue, 24 Jan 2023 11:11:03 +0100 Received: from MBX200F.cloud4partner.com (192.168.8.235) by MBX200A.cloud4partner.com (192.168.8.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Tue, 24 Jan 2023 11:11:01 +0100 Received: from MBX200E.cloud4partner.com (192.168.8.234) by MBX200F.cloud4partner.com (192.168.8.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Tue, 24 Jan 2023 11:11:00 +0100 Received: from MBX200E.cloud4partner.com ([fe80::881b:2a52:f04f:d634]) by MBX200E.cloud4partner.com ([fe80::881b:2a52:f04f:d634%13]) with mapi id 15.01.0669.032; Tue, 24 Jan 2023 11:11:00 +0100 From: Hans Buschmann To: "pgsql-hackers@lists.postgresql.org" , Tom Lane Subject: Re: Making Vars outer-join aware Thread-Topic: Making Vars outer-join aware Thread-Index: AQHZL9jYsrLdnKDgv0e6Yna44D71cg== Date: Tue, 24 Jan 2023 10:11:00 +0000 Message-ID: <8c3a9f69b5d44373bdd35e640e59305c@nidsa.net> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.8.240] Content-Type: multipart/alternative; boundary="_000_8c3a9f69b5d44373bdd35e640e59305cnidsanet_" MIME-Version: 1.0 X-cloud-security-sender: buschmann@nidsa.net X-cloud-security-recipient: pgsql-hackers@lists.postgresql.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on ma04-relay.lansolnet.com with 264C9B82366 X-cloud-security-connect: unknown[192.168.8.230], TLS=1, IP=192.168.8.230 X-cloud-security: scantime:1.364 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_8c3a9f69b5d44373bdd35e640e59305cnidsanet_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Tom I just noticed your new efforts in this area. I wanted to recurr to my old thread [1] considering constant propagation of= quals. You gave an elaborated explanation at that time, but my knowledge was/is no= t yet sufficient to reveil the technical details. In our application the described method is widespread used with much succes= s (now at pg15.1 Fedora), but for unexperienced SQL authors this is not rea= lly obviously to choose (i.e. using the explicit constant xx_season=3D3 as = qual). This always requires a "Macro" processor to compose the queries (in = my case php) and a lot of programmer effort in the source code. I can't review/understand your patchset for the planner, but since it cover= s the same area, the beformentioned optimization could perhaps be addressed= too. With respect of the nullability of these quals I immediately changed all of= them to NOT NULL, which seems the most natural way when these quals are al= so used for partioning. [1] https://www.postgresql.org/message-id/1571413123735.26467@nidsa.net Thanks for looking Hans Buschmann --_000_8c3a9f69b5d44373bdd35e640e59305cnidsanet_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello Tom


I just noticed your new efforts in this area.


I wanted to recurr to my old thread [1] considering constant propagation= of quals.


You gave an elaborated explanation at that time, but my knowledge was/is= not yet sufficient to reveil the technical details.


In our application the described method is widespread used with much suc= cess (now at pg15.1 Fedora), but for unexperienced SQL authors this is not = really obviously to choose (i.e. using the explicit constant xx_season= =3D3 as qual). This always requires a "Macro" processor to compose the queries (in my case php) and a lot of programmer = effort in the source code.


I can't review/understand your patchset for the planner, but since it co= vers the same area, the beformentioned optimization could perhaps be addres= sed too.


With respect of the nullability of these quals I immediately changed&nbs= p;all of them to NOT NULL, which seems the most natural way when these= quals are also used for partioning.


[1]  https://www.postgresql.org/message-id/1571413123735.26467@nids= a.net


Thanks for looking


Hans Buschmann


--_000_8c3a9f69b5d44373bdd35e640e59305cnidsanet_--