Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0lcf-0008Ec-45 for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Dec 2022 15:37:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p0lcd-0005Jh-BC for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Dec 2022 15:37:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0lcd-0005JY-2A for pgsql-bugs@lists.postgresql.org; Thu, 01 Dec 2022 15:37:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0lcZ-0004fB-DB for pgsql-bugs@lists.postgresql.org; Thu, 01 Dec 2022 15:37:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2B1Fb59w1581701; Thu, 1 Dec 2022 10:37:05 -0500 From: Tom Lane To: Duncan Sands cc: pgsql-bugs@lists.postgresql.org Subject: Re: pg_catalog.pg_get_viewdef pretty-print removes important parentheses In-reply-to: References: Comments: In-reply-to Duncan Sands message dated "Thu, 01 Dec 2022 15:12:09 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1581699.1669909025.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 01 Dec 2022 10:37:05 -0500 Message-ID: <1581700.1669909025@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Duncan Sands writes: > When pg_catalog.pg_get_viewdef is called with pretty-print enabled, it r= emoves = > parentheses around (DATE + INTERVAL) in the construct "(DATE + INTERVAL)= AT TIME = > ZONE TZ", outputting SQL that fails to parse. So it does :-(. Will fix, thanks for the report! regards, tom lane