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 1wGAnt-005xUF-1O for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 07:18:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGAns-0059Pu-1u for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 07:18:20 +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 1wGAns-0059Pm-12 for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 07:18:20 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wGAnn-00000002mtN-2O7t for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 07:18:20 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id E8EE3140019D; Fri, 24 Apr 2026 03:18:13 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Fri, 24 Apr 2026 03:18:13 -0400 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=fm1; t=1777015093; x=1777101493; bh=WNe3I8cCpXDu1GcKmGYYsz0ok8zpurzr D8ihDi+Yxpc=; b=PuacvdBXuti22T5nuQOihJnQe/LLbAJUaTKse+ligGpt+Yji 1zobao9qUjPBiNrawPHO/EwaFLywy2UoKmGD9w04a6UBeh5/9b/sgPk1fUEHzXAN 0Oi4lvi66MWowDLFrkM6DziV5Njikutr5lYD+o0DNkcEM7wMT7AUdkKJJ/yy70Jc Z7yvAlj9UyHOoHFFP+I3cuUXtAhtQtIosa5XTESKPwHgwagSarj4XlEd3OGYwS7r t3JMHNUHDu/6sI7I3mINe13z6tBNibSiY/d0CzZ+z2SGnEm56mqq8SOUsF9OG+YL uB/1OczmE+yNRi9QAYUR1D2SBfUy6XKu9k6j5Q== 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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1777015093; x= 1777101493; bh=WNe3I8cCpXDu1GcKmGYYsz0ok8zpurzrD8ihDi+Yxpc=; b=I hJVghL685u7ocMA3YO4nxAgZrqgCK8jp01zPnh4nn7ZvgSu4DLFJZxGmlZ3P7Q2e 0dLPyVhbgXtc7w4TP/hyQ/sVIpU2Uhlx+U/K9HjUGr82c6uDbxlKWbtOjmJK9x0O lXRY1Q8i8O9j/V1KWjmd9bFzWnw7EPwEK2fuNFs6FvB29ODTX33j8AOxzrLrd3Yw mwDOv0THY0EqvMYSZiWE4eiSxfVNqlMQjufVE/EvXXFgY74QlGIiL1vB9CE0ZHo6 kXrFOyrfrruQMWycEebFpXAjm4V7DP676qdLpIVEIVhtjbrIWRmg8Id1cRKuU6aH rNffpRFWMPqAU6gHJ3S2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeileegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueetvdff udekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgrthihrghnrghrlhgrphhurh grmhesghhmrghilhdrtghomhdprhgtphhtthhopegrshhhuhhtohhshhdrsggrphgrthdr ohhsshesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhsse hlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Apr 2026 03:18:13 -0400 (EDT) Message-ID: Date: Fri, 24 Apr 2026 09:18:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Bug: pg_get_viewdef() fails on GRAPH_TABLE views with lateral column references To: SATYANARAYANA NARLAPURAM , Ashutosh Bapat Cc: PostgreSQL Hackers References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: 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 21.04.26 10:02, SATYANARAYANA NARLAPURAM wrote: > The code doesn't explain why it adds the dummy context but it seemed > intentional. But it's not used at other places like deparsing WHERE > clause in element patterns or that in the graph_table itself. Since a > lateral reference is allowed in COLUMNS clause as well, it doesn't > make sense not to pass a context with lateral namespaces. Also there > is no comment explaining the dummy context. So your fix looks good to > me. I adjusted the surrounding code a bit. > > I adjusted an existing view for the testing instead of adding a new > one with all the additional objects. Since that view definition was > getting more complex, I formatted the DDL to be more readable. > > I also think that we should use prettyFlags to deparse all GRAPH_TABLE > components in a human readable form. But that's out of the scope for > this patch. > > PFA updated patch. > > Thank you for updating the patch. It applies cleanly and the related > tests are passing. committed