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 1tXdgo-00BVUo-7T for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 09:58:26 +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 1tXdgm-00GqDx-NF for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 09:58:25 +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 1tXdgm-00GqDp-4x for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 09:58:24 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tXdgl-000Kqv-0d for pgsql-hackers@postgresql.org; Tue, 14 Jan 2025 09:58:23 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id 2E52711400CE; Tue, 14 Jan 2025 04:58:22 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Tue, 14 Jan 2025 04:58:22 -0500 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=1736848702; x=1736935102; bh=4XcYL5C4XAhB5FuDcdfljH1cPzoFPtOG 7rVNQaXydEE=; b=MmFMZuH4BdYyB3m+Fm3zHSdxXP5OxHPnu9G+3BRzWihAoZQe +66rA9xZbCt4LvNgp7Qqjc4Emzh/UHf+B1FoL9de24+MXcdiQ051OpDaqqYEpFdM NPoTUg5/ZhbeQnePQpUlso4KUNrWuyWhq51SV15gkACWon8FDic3BK1Tc/76wmO2 IxAdKrAq2byh/lx4+/0SWnktYTQRQWiAtf64ApDkT3OCmgDhp3vxoJSC34jPC1PW B8cH1E8RiUB34PyReBpsH+cIj96Vq0dcP3g9geMME9kbBPEcgnoFaMs+f2MKh0QM Robwvn8K3D05KNmeZVotNWCswPc/BNyB/5k6mA== 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=1736848702; x= 1736935102; bh=4XcYL5C4XAhB5FuDcdfljH1cPzoFPtOG7rVNQaXydEE=; b=v eSdvyZN5VAYtTjGAZ5VvBKHdpkQ3wtUvajvxYVUBR0cNvPZFJIyN7yhSafcUEty4 qzyKtbbz+bSlBga0LZvjoRiVGGOZIumwGO2kJQncVxtPq1SEb/qQeLsyQjFKlErk LDLjNcFgH3PTz+2WBO86x/ofHbqH3Ca/zInwApRsA+CEPU++yQj7jScJHr8U/m40 wiiEEBzVXDMMilsVJaSBvx8uBZl0myYlCFgHjee9dqKKVgtTTK4VYmQd1gvcT+uf YHZflgQopweeauVbhN3at1u3aSppX68jW7VwSpj91D2NpFlIBB0fRgqF6+z+lv4N nCxF0+lpn67UymTeMgdZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehiedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepleejtddugffgffefhfeiteef heetudekjeeutdelhfeggfffudejheeufeduffeknecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtoh epfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhirghnrdhunhhivhgvrhhs rghlihhthiesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrh hssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopeguvggrnhdrrgdrrhgrshhh vggvugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Jan 2025 04:58:20 -0500 (EST) Message-ID: Date: Tue, 14 Jan 2025 10:58:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Virtual generated columns To: jian he Cc: pgsql-hackers , Dean Rasheed References: <0f811f71-8c86-4e1b-b3bb-6a535674a440@eisentraut.org> <09800cb1-43aa-4239-8918-46b71ede4900@eisentraut.org> <536b281b-2cb3-4477-971f-c64838bc6263@eisentraut.org> <41f64e3c-db80-43b2-9a21-7ecc515f889f@eisentraut.org> <1662507.1736354338@sss.pgh.pa.us> <721f6d40-ac9b-4103-aec8-a664f9e9dc1c@eisentraut.org> 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 09.01.25 13:41, jian he wrote: > we can not ALTER COLUMN DROP EXPRESSION for virtual for now. > so the following comments in generated_virtual.sql conflict with the output. > ``` > -- check that dependencies between columns have also been removed > ALTER TABLE gtest29 DROP COLUMN a; -- should not drop b > \d gtest29 > ``` > we can also comment out line 557 in generated_virtual.sql. Ok will do. > attach patch is removing unnecessary parentheses from > ```ereport(ERROR, (errcode``` > only for this patch related. > per commit https://git.postgresql.org/cgit/postgresql.git/commit/?id=e3a87b4991cc2d00b7a3082abb54c5f12baedfd1 > > also https://www.postgresql.org/docs/current/error-message-reporting.html says > ""The extra parentheses were required before PostgreSQL version 12, > but are now optional."" Right. I tried to keep it mostly consistent with existing surrounding code, but I will do another pass to improve that.