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 1w8Tjg-000ZbM-0X for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 01:54:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8Tje-009HkE-37 for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 01:54:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w8Tje-009Hk5-1u for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 01:54:11 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8Tjc-00000000IbH-1Wzl for pgsql-hackers@postgresql.org; Fri, 03 Apr 2026 01:54:10 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2aaf59c4f7cso6768195ad.1 for ; Thu, 02 Apr 2026 18:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775181246; cv=none; d=google.com; s=arc-20240605; b=gMKR9CFunNx4srubfsSW//J+MWj1N4POa2dBrsvsyMY5ZX5e0EJGcj9JmKUv7Xtpgy On4q9EzmpQomm3SeC+iLD5p0RcT2YdhGepq+0jkBuB7fQdz9dHkAFNmS0YBrMfBIrPOO 9Ps5JqlSYqbshTNc/WCM3NGAOuU6agEFLleKd+YAlZtjy8JvK6VasGnZO8cUe2g1sZ/1 UnsOAJ6niEphKSLaIXPme1qFF6EUEEcQ/YylQ5peAKuAzAr3Z1Mn8a1YmIetNUAYnEW5 gjoVF1I+9o3t6+SwnLzdMgoV4WEmgWi1Jfm3+cYSmoXYQGav7OlxNcoQ/4yTw5Vyvpy8 bRDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:dkim-signature; bh=xHpMkmziOW94Xr4hduIoo7CE0XYEaJ9kvdnE6L4cNIg=; fh=yDXPsFhn14+BhoIxWmyoK+aGSS1zgXSNrxEEJ/6L5+E=; b=UcJule5zd+e8ZWFz/BGOlqByTu8ilKek2D2hciQftNb1aEHBafJAryzcRxrddTeLU9 ndCLdAJXho7Fr6lMRtgJ7a3ZKcNLrKGahDnYiKTrWrRqNECeR1xQ0GnzK4lpDLWZPCRO 7gMklRoHbbPeEwGpmQAAfZed3+7ZWbu5ObssFqTMNNCqyH/3hH0bkjF67joy331Ct0uN vrdVdF/cUOh6RHuI8sUYlsCiK9Z6xhnKBIrqAETPP5O1fgv1R3AKz1Xwv078dWi5rSGm 9zy48VC1s0eaaKvKbvDmZCgAjCGwECBMchjiekODVclp3KA75OWpZeJW8s5oLPa9p1Qc PA6w==; 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=1775181246; x=1775786046; darn=postgresql.org; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xHpMkmziOW94Xr4hduIoo7CE0XYEaJ9kvdnE6L4cNIg=; b=Zs0sRZ451uRl7Vd+B3ChcFxYyG7HokQbiy7/6TWjrpXdvtrpANL1lTlpABnH7gdiAp LtdHvCt/FjnBb1ME6KWp18JETTD9aE2QDg/wl8xjtXUdKWok6fD8u381iqZYNlxkZwu4 XnrkN1p/ttzbQFIny723ih4n59masunV6WPGs7ojCFxBr2Mlm0ES3Rwoee8tMwMAuYbU 6fJkcLu6at9+GANoVUa74lLQBu2TyIASYrm9UhtPUFcATN0yJs2OxX0SU1laFH/PGVfI tyepHDPK2HlKGgNgcIq6XOiX4vizYasRk95haCZgXySvJ41+J1KLthVwBtO5WEkjFT1S U0lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775181246; x=1775786046; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xHpMkmziOW94Xr4hduIoo7CE0XYEaJ9kvdnE6L4cNIg=; b=C/KBQCxNb1xdjLASiBEqraG/iBr501WQQ9/9eG8OWejXQ9tEBcCAB2KIWFOCL26tHv R5rggqJBIDdjWVvSss+DyezoUj8T5iNv06hlCnS+EhMOOinpMm+7ZTdJsFuh24hp5Zq/ 5+fz2fDa3XyyUDa6BachB+mmrRwA1J3T0etJnjNqGN4P/y3SmAe3Ow4MuWOL8pbQRBC0 O70DusaFeKd9Z6UsIpPoKvlD7e20pta3UEg9Rb0FvHAblv/amtDqrTVyKGt3NnVNc4vv Ds7e0rqgCTSERPsVNwR+/tKLjFtZgeyztDPD563JUHm8s8jm5//F/+U9Mpf/bpCPJ212 P7fg== X-Forwarded-Encrypted: i=1; AJvYcCW7n+34Ivu2FNsBXptXJYyS7+ksDo+sj24KY8hDuTuBekoU/tojEr3DAkXIpAcJ2QRjv3EqwCkQQ3ieAyUw@postgresql.org X-Gm-Message-State: AOJu0YyfcZ9hD7hzsv4NL7FBHnG/zu1hrxddlvyErFIRWk/2JqFpX1XE aFHjCot0yIQnjFgOCR/q8gCo88f/24zQDnfUmxBLhHnp6a2sIstra7XYxyEP+1Dj0a5jUd0ti15 iX5en3hs+kR4l3bWFpMavw6Zu/BfRjgg= X-Gm-Gg: AeBDiesWm25Hcyhsag1g2lZHoNfrV6DMOcMccjjJj+mv1bNiAe+A3c1EZeL8aLXGB+u Dy5hyGif3MqTw9/S4vifzmioC0w/H/I1Y+s88c9YkiDCfXgRpnEQvCFbS+bfNfOp8Coa3m6rdb2 irZwJtceEu2LmZWD6+u5xcdnfj2ReXGNQe4Slo9tSag2EXefeV2o/MbPvijPuqicuiBwOub9VFP bZG5Yy2MfWcBoDj8Z8ZcpOVv9wAWTuWmyaiTUeqvfr8IOp8GyQT+5cXC30M6FJDTDqQNh32+HP7 +GYCOXADdOFZcwbUYceG3O5TaAxWdTjb53CelaojA0cuGq8xTQ== X-Received: by 2002:a17:903:3b84:b0:2b0:6e60:9582 with SMTP id d9443c01a7336-2b2816dc813mr15026505ad.18.1775181245690; Thu, 02 Apr 2026 18:54:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: assam258@gmail.com From: Henson Choi Date: Fri, 3 Apr 2026 10:53:54 +0900 X-Gm-Features: AQROBzCs-MdL2Ons21qv53orlATL5FIXzNq38BqmPinKOqaMeC-PayRIJlNWKoM Message-ID: Subject: Re: SQL/PGQ: All properties reference To: Ashutosh Bapat , Junwang Zhao Cc: Peter Eisentraut , pgsql-hackers Content-Type: multipart/alternative; boundary="0000000000008fb61e064e84972a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008fb61e064e84972a Content-Type: text/plain; charset="UTF-8" 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? Best Regards, Henson --0000000000008fb61e064e84972a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ashutosh,

I am starting a new thread to discuss all properties reference feature
which was not committed with the main patch. [1]

A <variable>.* 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 <variable>.p1, ...<= br> <variable>.pn where p1, ..., pn are the properties of the labels whic= h
satisfy the label expression in the element pattern identified by
<variable>. The graph property references are added to the COLUMNs clause in place of the all property reference, just like how <table>.= *
expands in SELECT's targetlist.

In the current implementation, we delay resolving graph property
references (<variable>.<property>) till the time query is gener= ated
(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:<= br>
- parse_graphtable.c
- rewriteGraphTable.c

The conflicts c= ome from this commit that was added after the main PGQ
commit (2f094e7ac= 69):

- a0dd0702e46 Fix cross variable references in graph pattern ca= using
=C2=A0 segfault

Would it be possible to rebase the patch on= the current master so
I can review it cleanly?

Best Regards,
= Henson=C2=A0
--0000000000008fb61e064e84972a--