Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdYDM-006AzZ-4t for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Feb 2024 16:15:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rdYDK-002998-4T for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Feb 2024 16:15:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdYDJ-002990-IR for pgsql-hackers@lists.postgresql.org; Fri, 23 Feb 2024 16:15:54 +0000 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdYDC-000cxp-K6 for pgsql-hackers@postgresql.org; Fri, 23 Feb 2024 16:15:52 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id 51E201800091; Fri, 23 Feb 2024 11:15:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 23 Feb 2024 11:15:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1708704944; x=1708791344; bh=5/Lv4T0sOXtqV/JnbA9t06D5gvvHYQ6E QqLg2ISn1aQ=; b=rHudOftTn5NuvFNm/22sa7x1eEQP1edKf1+c3Q5eZIOBvuPY yQ8LQeNLwdDVNko1UnzGIU/Obvw1SyIrdymdzvLJeJOnprlOOH8c8mU32Q+PJec6 i7tLwAaNgi6Z94doVeYfc3QzCyh0SExTkweI4djvQ70JaxXh7I1ejkqQTlzRaddx bt7+rOMW4H2i8wQP6jeTKpTIAGNS+Ly48kIte5X6DCosZvCflwIRQOVWT9vAzcpL bVY/NCs4sOmK22lA9wCVX757a4UeY+uHyJEC8oQtG86OQejxljyZTcKLzH+DFMmw lDlixpdOYnUQ62roalXvDlC+3D/8g9I43ynJgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708704944; x= 1708791344; bh=5/Lv4T0sOXtqV/JnbA9t06D5gvvHYQ6EQqLg2ISn1aQ=; b=j t6x1QO1vRO/MpaI8nhF8h5j97KpL0ymth5Abm6ESQ1hwjn3pWYmLLjEJ2gDXrVtn 8ysQ2MaBj8AJi6yf5/raUxL9dTVgn7H50cA97C3MJdtZc3HGbKtAB4Wz8Uyx2Cib 66YxSi42eXVDyFvqRWMg30eClHW1xzTudTOiOyQ2HHMdk3gC9n/VL0bLULAxs50L ajlYiv2vNBIMG3l6NQTZWZhACY2ISIms5LdUuKc6PpdYqKDyhwtqG9Fz23Qx580N p/gm3lmKMPedEaK40AXfkOiWoaVVBluHCS9V2eXQj3G+qCPCuAXi3Eu7VuzOLp2I YI4fKMPaiuCz1FDV85Yew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeigdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 23 Feb 2024 11:15:43 -0500 (EST) Message-ID: <9c5edd61-c415-475b-a088-7bd7461b21a4@eisentraut.org> Date: Fri, 23 Feb 2024 17:15:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SQL Property Graph Queries (SQL/PGQ) Content-Language: en-US To: Andres Freund Cc: pgsql-hackers References: <20240216192301.q2tf4bqjydymg3g2@awork3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20240216192301.q2tf4bqjydymg3g2@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 16.02.24 20:23, Andres Freund wrote: > One aspect that I m concerned with structurally is that the transformation, > from property graph queries to something postgres understands, is done via the > rewrite system. I doubt that that is a good idea. For one it bars the planner > from making plans that benefit from the graph query formulation. But more > importantly, we IMO should reduce usage of the rewrite system, not increase > it. PGQ is meant to be implemented like that, like views expanding to joins and unions. This is what I have gathered during the specification process, and from other implementations, and from academics. There are certainly other ways to combine relational and graph database stuff, like with native graph storage and specialized execution support, but this is not that, and to some extent PGQ was created to supplant those other approaches. Many people will agree that the rewriter is sort of weird and archaic at this point. But I'm not aware of any plans or proposals to do anything about it. As long as the view expansion takes place there, it makes sense to align with that. For example, all the view security stuff (privileges, security barriers, etc.) will eventually need to be considered, and it would make sense to do that in a consistent way. So for now, I'm working with what we have, but let's see where it goes. (Note to self: Check that graph inside view inside graph inside view ... works.)