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 1tl7a7-009Spb-ER for pgsql-general@arkaria.postgresql.org; Thu, 20 Feb 2025 14:31:15 +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 1tl7a4-007VjZ-GL for pgsql-general@arkaria.postgresql.org; Thu, 20 Feb 2025 14:31:12 +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.94.2) (envelope-from ) id 1tl7a4-007VjR-2g for pgsql-general@lists.postgresql.org; Thu, 20 Feb 2025 14:31:12 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tl7a0-001ySe-0D for pgsql-general@lists.postgresql.org; Thu, 20 Feb 2025 14:31:11 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-5fcd686fe0fso623051eaf.3 for ; Thu, 20 Feb 2025 06:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740061865; x=1740666665; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=kUvTmgSra4iVv4TVC8VjMJN9N4Y6fevdCTpM5xgskQQ=; b=BIqPqWhmIaBluMPU2tFab+cIpcmi4A6TaJbhy/Cg7LoH29r/oXRG7iN55l7Pe01NQ/ tLSZBISAW59cq01wlOG6PyfPr6iyN/kzQNrhZObJ+cKXLHDrVE/T3ZjueFaB/Q7DBySG 85Wdh5DE84dPwlEOFtBcxWC2x9PutcsB3nVmwNe2bQAVHxD5xMJCXIePdPDOuEdgYZSf 6M3KnCB47wWqCuYs5cLb5Ig022hF3JJRFHwyrcXKduVpp0CgN5SyA3F+6bIrs1KPsZ4J VJ0mIlIc/bMmXNrgxDmoxIiezOrhwOdlR5sSqqma42JUIM2CB3cixb1xnC2WQctmxnaY 2cFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740061865; x=1740666665; h=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=kUvTmgSra4iVv4TVC8VjMJN9N4Y6fevdCTpM5xgskQQ=; b=JfRj4QcIzV9Hf3g3QNffzudpvC6kN9zRciYkQ91ZwTgnW3raA7jREKJXQ5IvTlT/YO OC5RR1rhOTRu6qu88u4xIRuQblXotITTcKvlf8xXaJp9qItc/Zdsli95KvTzt9c3gybK Mgety39UNIEtJV4Dc7bVoqs95Gl/7Z/lWqgMsQZz9FLKXCRJt8AMBvmwhYAgT27JNZuV X7ZL3MUtJ5b+tOVVFRDk7gRH0voHkG5vfcgmCA/RejfoCyy2aQXKrLUl4IwTy12riUEB BOQ/7upkwC8ZUU9pjn6+d0+39pOgsdJWRrw3ZObDbftBB/eufMtRplumzDyfRPgmP2fc Q9Tw== X-Gm-Message-State: AOJu0Yx9hT9lQ4mGrklH5JKjVB7H6Thj1hBoC3p0QmaaBI1JaPTJGPJk f9RpaRfTHd0gvvlPzkE19+GLlqq+oZI6HRmtqerP79LLiPXlRSjR0gd1Xy/6dm6Nl8QRVHPGdvC Nnka6Eb4UGhdkCRmo6D2cnOB7la7pMQ== X-Gm-Gg: ASbGncvS1MziqNllhk2d3QRCi7n2Cxv6Rez80KbGHl0JkoaPFeUAvoR4GpEMkM2daBE bmLNz/snW/6LXzpqPZdYWPQbRH/eglkyatm+azDX2LOgh4jISVRGUNmrXRRbhxGIWK5l7SxzYgg == X-Google-Smtp-Source: AGHT+IGFroGN76hGt0nMmp79QIc0HvwvUeQV56pq0ZvcDb3JOej+p4GzzsRdE6lg3QEeggb1EfiGMuISMnf+iNsGYjo= X-Received: by 2002:a05:6870:a10c:b0:296:a1fc:91b5 with SMTP id 586e51a60fabf-2bd10158c01mr6084872fac.8.1740061865220; Thu, 20 Feb 2025 06:31:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Thu, 20 Feb 2025 09:30:53 -0500 X-Gm-Features: AWEUYZnC7lF305mRQdRO4ubqhExcJLi5QmlNcdHo_cJRfTo5p32YZ8bSbJBUpu8 Message-ID: Subject: Re: v18 virtual columns To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000005d23dd062e93b96c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005d23dd062e93b96c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 20, 2025 at 8:07=E2=80=AFAM Dominique Devienne wrote: > Hi. I've just read > https://www.dbi-services.com/blog/postgresql-18-virtual-generated-columns= / > > and I'm wondering whether there will be a way to ALTER existing STORED > generated columns, to be virtual? W/o rewriting the whole table that is. > What about dropping the existing stored column then adding the new virtual column? You won't get any disk space saving for existing records, but it's not going to rewrite the table. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000005d23dd062e93b96c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Feb 20, 2025 at 8:07=E2=80=AFAM D= ominique Devienne <ddevienne@gmai= l.com> wrote:
=
Hi. I= 9;ve just read=C2=A0https://www.dbi-services.= com/blog/postgresql-18-virtual-generated-columns/

an= d I'm wondering whether there will be a way to ALTER existing STORED ge= nerated columns, to be virtual? W/o rewriting the whole table that is.

What about dropping the existing st= ored column then adding the new virtual column?

Yo= u won't get any disk space saving for existing records, but it's no= t going to rewrite the table.

--
Death to <Redacted>, and butter sauce.
Don'= ;t boil me, I'm still alive.
<Redacted> lobster!
--0000000000005d23dd062e93b96c--