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 1tcjaJ-002HPn-UZ for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2025 11:16:48 +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 1tcjaI-000WFV-PZ for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2025 11:16:46 +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 1tcjaI-000WFL-As for pgsql-hackers@lists.postgresql.org; Tue, 28 Jan 2025 11:16:46 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tcjaF-001vUd-2c for pgsql-hackers@postgresql.org; Tue, 28 Jan 2025 11:16:45 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5db6890b64eso11161694a12.3 for ; Tue, 28 Jan 2025 03:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738063003; x=1738667803; 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=gs+Q3c+cLVTOqNjyz4RILAis/d3VToBssInooajn3gw=; b=Q41Eht9NGHEoEx96PyLfrU71qo3zmNXdVEFF9lYeYw997vsJ9MyxTAiWeAiMN4tS1Q QxSwEk0U9+RHpPV2mgu0F+nN4nsa5aS5Gy2pxj5thT4kIHQVXoaiEsoiUUHpSj/JHhSk 4Jts2f+jS9MvsXip0UduP9d/RUyZsTqDDSiw6n1z8aJtthmRNzmDUPscSw7Z06yx47D9 iJUJR9n18A8cb9tTjuP2SM7jaWtqKALtUVWg3RowweoWmLBDqlmkQmAhvtZczI3TTxOM Xk47oU71qXOUkIcoFJ5q7RuDmJM0nlZsiVXAjygsuveVacANMIHvClESGejs+ec2A+Oc Xh1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738063003; x=1738667803; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gs+Q3c+cLVTOqNjyz4RILAis/d3VToBssInooajn3gw=; b=MX40a4tmnXBfcYfFCc/It8bdb0bF1UlQj9BDhmvCQhtf8sAjgZml5YqLkyk/h4cdRD v5RYCnAT2dHFDPe1VIN/PWCcuZ/Uy1TAFaBfHNDY++HrwaYsI7h2zgxjCc9MRNL5btbX rgg7rMI7YLH4AXwcqXBB8ZygLnh8AwNP502lHXcSkAeK09bMrutb/EQE3na14POgpxgC lVPuPAEMuMhXlL4zkaWp0i4RuRngH9ExJfwy8JvebCvRfQX5fPxZKCijhNFZjpjwVmtT aRLdQOvzXYMoIdlMJ2xOaoW0lFtdFj8owmPt+CGw9o3ZQEHr3CvQtqaG8ddrNWXZcyWr NTEg== X-Forwarded-Encrypted: i=1; AJvYcCWx/ed+4pas1EwqRLydqOqg+ib9Tz4pO5gR/0W7/p2AhTBDz3uC78768brRF375lxVSLkCJNNwxojUepmbU@postgresql.org X-Gm-Message-State: AOJu0Yz04AVRZMEBIPfoCPKuyxgLl8EX5ZT+jRjEuZDd5NfYhdFsTpgc 9/MWBhZTKLFcqUpNIemKWDYcesRTzBtXYphduhtN6prEOdHMuR+xOEQjPElbCUhGyJlFWiN7iJB wSkZOiZyAPTNpospYvcATbZ4GbwA= X-Gm-Gg: ASbGncvLwum0Y7CvhrAgvEzrKR63AwcccBKvp//VNMCJeKIQ/snheu/2sYQmqJ6zK/P +8tk+h8X6smJd0ZhV8LBRDgMToEURxPezOh1X846KCv31GUFK0pQYl7JzSjEonzHZYn/gfCA= X-Google-Smtp-Source: AGHT+IHebIORIOdAxYMTK3YhqrNOJZRCOYtOLpjjCOwL3hhySeomVC7Kq33acxEqbhpQk0NjTCdG/9NCHv4LmxOmxpo= X-Received: by 2002:a05:6402:254a:b0:5d2:8f70:75f6 with SMTP id 4fb4d7f45d1cf-5db7db12d0fmr42762908a12.30.1738063002480; Tue, 28 Jan 2025 03:16:42 -0800 (PST) MIME-Version: 1.0 References: <04c0abe2-e9c5-4ffc-97b2-bedc1e3cd178@eisentraut.org> <3b190de8-910a-4091-82f9-e98cf562d832@postgresfriends.org> In-Reply-To: From: Junwang Zhao Date: Tue, 28 Jan 2025 19:16:30 +0800 X-Gm-Features: AWEUYZkXygU93k8TQHjZ1k4THD-14JXw2--uMWCtSbK_pWwQIfhLdMcGN5U3rmM Message-ID: Subject: Re: SQL Property Graph Queries (SQL/PGQ) To: Ashutosh Bapat Cc: Vik Fearing , Ajay Pal , Imran Zaheer , 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 Tue, Jan 28, 2025 at 7:03=E2=80=AFPM Ashutosh Bapat wrote: > > On Tue, Jan 28, 2025 at 4:31=E2=80=AFPM Junwang Zhao = wrote: > > > > On Tue, Jan 28, 2025 at 6:17=E2=80=AFPM Ashutosh Bapat > > wrote: > > > > > > On Fri, Jan 24, 2025 at 9:16=E2=80=AFPM Junwang Zhao wrote: > > > > > > > > I figured out it's because I have `-DWRITE_READ_PARSE_PLAN_TREES` t= his option, > > > > removing this option clears the warning, but I'm not sure if this i= s a > > > > hidden issue. > > > > > > > > > > Thanks for the hint. I found the issue and the fix appears in 0004. > > > Some members of RangeTblEntry were not being handled in read/out > > > functions. > > > > Thanks for the fix, I will apply and test again. > > > > > > > > > > > > > > > 0001-0009 patches are the same as the previous set sans mergeconf= lict fixes. > > > > > 0010 - is test for \dGx - to make sure that the extended format o= utput > > > > > works with \dG. We may decide not to have this patch in the final > > > > > commit. But no harm in being there til that point. > > > > > > > > I have some changes based on the latest patch set. I attached two p= atches with > > > > the following summary. > > > > > > > > 0001: > > > > - doc: some of the query in ddl.sgml can not be executed > > > > > > The standard seems to require a property reference to be qualified by > > > element pattern variable, even if the property is referenced within > > > the same element pattern bound to the variable. Hence I accepted your > > > document fixes which qualify property reference with element pattern > > > variable. > > > > > > However, I didn't understand why you changed a LABEL name from order = to order_. > > > > Ah, that's because `order` is a keyword of SQL(order by), so the alias > > is a conflict. > > I'm not saying `order_` is a good name though. > > I didn't realize that. Thanks for catching. In that case just orders > or cust_orders? Yeah, I think explicitly LABELed as `orders` makes sense. > > > > > > > > > > - after path factor was introduced, some comments doesn't apply > > > > > > Thanks pointing those out. Accepted after rephrasing those and also > > > correcting some related comments. > > > > > > > > > > > 0002: > > > > - add a get_propgraph_element_alias_name function and do some trivi= al refactor > > > > > > > > > > I see you have added some negative tests - object not found tests, bu= t > > > I didn't see positive tests. Hence I haven't added those changes in > > > the attached patchset. But we certainly need those changes. You may > > > want to submit a patch with positive tests. That code needs to be > > > fixed before committing anyway. > > > > Ok, I'll add positive tests. > > Thanks. > > -- > Best Wishes, > Ashutosh Bapat --=20 Regards Junwang Zhao