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.96) (envelope-from ) id 1w8XDe-000dBJ-1C for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 05:37:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8XDd-009vNG-0U for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 05:37:21 +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.96) (envelope-from ) id 1w8XDc-009vN8-2T for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 05:37:21 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8XDb-00000000IxL-1h3W for pgsql-hackers@postgresql.org; Fri, 03 Apr 2026 05:37:20 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-43d02a71526so940407f8f.3 for ; Thu, 02 Apr 2026 22:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775194638; cv=none; d=google.com; s=arc-20240605; b=WLHVl6sIWpkZKi3Z9rUKiHGrC8KGWLU+7vTCPL7E0avbt8t231XMmFah8ywUErwdGZ 1Cf1F2bINcNSdcB1oVB8tmjEpHBb+K9BZeNl1/yvOEb0ZVcmsgATq+29aJbJ+BBOJ0yG juAef2ax6qn0OVlr2CD7PE9jYFVo7g3glQ1ksUOJS/SViZ1S8fgcS1tSLvs08Vqw22mz 5rCK0Vx2V7MssqByEch4EZZjTo1JS4A9bV10SdULTHLhCU9UygxWAXzhp/E6srkwYYQt Ca+BcwGKfFH4/FUtRV/4QV4PW9Ue0HDCanlH3lrHThhmOMO5nHc1EDpQmt3JLTZhXn2O N0+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CYXDQC62SQcs8G/ijO5yGBqpgCnYNT/STAqzU2pzqRI=; fh=+Tulqe7fEeejVybnIK883ceehZqEPhNEFYuu27/RBE4=; b=W1l9IW3H9pkiawI524DM4t9ZyaIPdio2jEe0yGnHEND7MsAscDYkx2jTD+dTTmJ1PV sEqc9EWBxbC5jWvWTpn3I7n5tNeAtK86PZ11HHKBJ1PT5d9pH2mR30eclbIBVVjiSZCG aypScul6drAyM74lbDWK0CoyPlsr0kR29HnlVMgl4JW2NpXJkGO4WVM6dUbThA2iq6ql alZP205WYUs6RwG0EwmIOMUj77I/LAgpQlP/BY1IUVmTN17+JyDbNRCva1w5Vfch5Vgp aUoPGGaKlemo+vI2sg/3O1lr7ijrc9E5002wNdxrWCAs9rbRLgXXz07WHl51I+/JCA8R DoLg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775194638; x=1775799438; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CYXDQC62SQcs8G/ijO5yGBqpgCnYNT/STAqzU2pzqRI=; b=F1uRe7HNwXLXPUK9MeAPMe2geOlXcgqc0gQsu4AiSTb7ahJVj7V6qgYKB0NW1domdY IGWxittncCK8IZ8JXCjf/RJ+x9YxJ3pbBJtf4+TVl+6M5tQpjag9BxG0UXI+7rZiLBRE +6hQDSaR03fVXzF0URNeDPw//zpLDqL0o8O61kCbv5rFzYmZiMcpTKzeVnLqyCpMycde vBdwPif+KIuMkRa/NBr6QdbLFUI0MUz/z/MYjLUaqCJNOSpHbFVpz3/jjBaD0a7jCMfu 3DcAxasHxsXnCG0y/eXq1kyakdywfrUe/2Qmj9sxdTPJsAAvLED7nDa3EAJimpxyXfKg KbdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775194638; x=1775799438; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CYXDQC62SQcs8G/ijO5yGBqpgCnYNT/STAqzU2pzqRI=; b=lBFicU9t7azqzRSi/bDS3jMqS/N/TBckStvWRjfTCBJhsSn6ZZU1ZDMCsaBun+lOxg lqufFcFvG6Ir00Hf6wJdNaNtlzDg9aNm9n860dwgdbVFeNupLzD/at5tAP6U9VLja7z0 74pCI6w1TM9hwOPl0bU1KsRT5DXINlOqiTWSDzwLhKMySS2Y8O2MW5Og4kVi1kYeyD1q 7Cy8s5RJPTqZ1zTU2Y99p9DsqFVa/8vF3BXRGnly3r8z/qsp3Qto6hSbR5PaelRaZ4jz NDjXZjHwEH9cLy7G+L+7uvzMzWsRfnAT+ZIdXliWi2ycXiujMIoDJA4mRpfZ8wwxqZvf ai6g== X-Forwarded-Encrypted: i=1; AJvYcCWWZd1l78pHw65x46P3g0ODmseqfsYeQ610n5mFMcFCYRy1evqiKKE1lHJYJ4/Yp43SpH8l7/hmW+T52Lzg@postgresql.org X-Gm-Message-State: AOJu0YxSkwc0iLHLJGsBAQ/tbvdeCqpk+fl7kTSAsZ0VffdEr017QEgQ JYaUme3pGcSTDriWQZqC6NWRE6rgyJ8ZXURvbqOvzF6updt7EZB6/Ejf1aIJIoIsXy6rPKKRDk0 KJgGLCqvLVs7VFb+nmGlbgfpA0hdrW9A= X-Gm-Gg: AeBDies249BG9qaBp5HaOCtjVotgaTQq0K+pAISNGZxc1hjxSoXS3+Pp3P2jSYhh6Ah VFrYkq8+BlLitnDNGiM1y6Uqsxdg5iAY3uHB44GiRPJNZ9tp0mED7hFKJtkF1ZFK20YuiNyJdo7 Sdw0aJoV8+I9ZbXIKYc8bF47dARrKm2CrGmAKPGS0R3G0JNI6XdR7JXN+BQsIsf0ZsCGF3dW9AP rkW6MImNoBNbcXqWy1HtDZsr4VZIO2DWucQuFpMPLRbFozLYL/sSGIKV6w4ubMud7fZKba9FHEd 4w/gv+qpXq1MNJcVillFRhGK0Gi3yL95zOxaT8DtTy2lS83+M8Y= X-Received: by 2002:a5d:5d08:0:b0:43c:fed2:bb78 with SMTP id ffacd0b85a97d-43d2930fa32mr2395443f8f.44.1775194638007; Thu, 02 Apr 2026 22:37:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Fri, 3 Apr 2026 11:07:03 +0530 X-Gm-Features: AQROBzD_T6fzFizOxTCxJp9gpfi-w5DSdMgv2CY47FtcSLhJ3uP9KlzL_rhw40c Message-ID: Subject: Re: SQL/PGQ: All properties reference To: assam258@gmail.com Cc: Junwang Zhao , Peter Eisentraut , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 3, 2026 at 7:24=E2=80=AFAM Henson Choi wro= te: > > Hi Ashutosh, > >> I am starting a new thread to discuss all properties reference feature >> which was not committed with the main patch. [1] >> >> A .* is called all properties reference and it is allowed >> only in COLUMNs clause. Interpreting subclause 9.2 and 9.3 together, >> it expands to a list of graph property references .p1, ... >> .pn where p1, ..., pn are the properties of the labels which >> satisfy the label expression in the element pattern identified by >> . The graph property references are added to the COLUMNs >> clause in place of the all property reference, just like how .* >> expands in SELECT's targetlist. >> >> In the current implementation, we delay resolving graph property >> references (.) till the time query is generated >> (generate_query_for_graph_path()). If we delay the all properties >> reference till that time, we can not determine the data types and >> names of the columns in the COLUMNs list. So we need to do that when >> the COLUMNs clause is resolved. This means that the properties >> associated with the labels needs to be resolved earlier. Since the >> properties are not associated with labels directly but through the >> elements, we need to find at least one element for every label in the >> label expression. In brief, all the namespace resolution need to >> happen before we transform COLUMNs clause. The patch rearranges the >> code that way. > > > I tried applying v20260318 on top of master to review it, but ran > into merge conflicts in two files: > > - parse_graphtable.c > - rewriteGraphTable.c > > The conflicts come from this commit that was added after the main PGQ > commit (2f094e7ac69): > > - a0dd0702e46 Fix cross variable references in graph pattern causing > segfault > > Would it be possible to rebase the patch on the current master so > I can review it cleanly? I want to focus on resizable shared memory structures for PG 19 [1] in whatever time remains until the feature freeze. If Peter feels that we should get this in PG 19, I will rebase and finish the patch. I am ok, if somebody else wants to rebase and finish this for PG 19 as well. Sorry if this patch slips PG 19, but I will pick it up for PG 20, once the branch opens. [1] https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=3D52UiJ3z= 4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com --=20 Best Wishes, Ashutosh Bapat