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 1u9TKB-002C1h-EK for pgsql-admin@arkaria.postgresql.org; Mon, 28 Apr 2025 18:35:27 +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 1u9TK8-002r8s-TB for pgsql-admin@arkaria.postgresql.org; Mon, 28 Apr 2025 18:35:25 +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 1u9TK8-002r8k-He for pgsql-admin@lists.postgresql.org; Mon, 28 Apr 2025 18:35:25 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u9TK7-0003DW-2A for pgsql-admin@lists.postgresql.org; Mon, 28 Apr 2025 18:35:25 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-601a8b6c133so3078152eaf.1 for ; Mon, 28 Apr 2025 11:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745865321; x=1746470121; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RGJ8Ww7EmDoz6dwTDOR9mp8vPQk//35ek3AY4dGKnXo=; b=fJBuY95+30OPocKeA30dAFQnEHOieqUOd/vgP7oRtlrwlPUZq9YKJ+XLPlSYBd7UBD 7F0ExZ02i3/gd4wmijXRBdlnlKscEG8uPiDe1tuLwA2oS9Ico1tvLLAp6fnj6zDQDHpP aQ+PlDFxSTZnGb+nj6U2MoLbMT1qOgnlHgvfoK70dFiDsNkPWjzZ3h6gPPYzgBugQ5zZ tSba89PQ/XcIxWU7CZDSkIe4sTqdDlNGkz3ewYiS/uFm+pgyW8tg0IKHayX6dgPIWQXJ eHouAy4taT+iZ5qMEinrExPjqCnZzPScBhBXAkaVHcIDKg/Tu+BIEscKA1/8oPzTFUbU zExg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745865321; x=1746470121; h=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=RGJ8Ww7EmDoz6dwTDOR9mp8vPQk//35ek3AY4dGKnXo=; b=s096r/TjuxAwI8TnMa68bo09S0xvULvZbOtD/KxHwWXpvwY0Mfh7Q4VU9OCGYMHG6y es6RSOqrEVNyfhlqz98Q3qMRVewQrSaKenxmWjmZDCgNbkW5Z1+dN9WQNDNmXIUP9Ap+ LVgAgRBM1Z0yLgQXTNhAuuhNf8qJJNXPRFr7nOlAm6/h0W7wZAAtTLhTZkmY006nZcJB 4s7eJWTjiFaeEcVjAm0aMYaHzeOvhBzzK+MW5ptL3sKm4FwpcNKVsBUgDn+xz+LLdTSy 6S3SZhKjE+5wyZ6xguiDcJlKpEWmjKeAVsUdWrKL91IW06tnqGeQAcSL4ganDCRiyAPd z5LA== X-Gm-Message-State: AOJu0YxQJuy8U7EKAvE5aNTQcAbxYvjexxDu00sj+xlr7xSwyQPqyeYW hwfCkucM7cptdfDTDtK9AifurLoDNRDEctmkwHbldZ4CdccYw2nv96eGERlqGdFZxpBAQd8M4UE FpEoQplayugQuN7IYHOmKNPbU8bc= X-Gm-Gg: ASbGncv0O7hNS2vKEnGwD29tw1oqWzAHBGNMkGam5mvd4crcYO9f2Il0PxpBzAWp98d drRWt5CiEUqvlTks8Vrde7TPuE9DLh/H4yinHzyXpzFdiFKzdZk0RGubn/blu1EC6qbkojw6ahB 4uJjlg4rRo6eEfMb1OrceD X-Google-Smtp-Source: AGHT+IFgD7junO0qHfpqRBhsmq34kEj1k5qDAeHjzy5VyXYke8rP1M6uglVPGn9iZbzdwWz7z5g6BeGMWUH0rDbXKaM= X-Received: by 2002:a05:6870:d689:b0:2d5:2360:4e7d with SMTP id 586e51a60fabf-2da462ed2cfmr172529fac.8.1745865321362; Mon, 28 Apr 2025 11:35:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Mon, 28 Apr 2025 11:34:45 -0700 X-Gm-Features: ATxdqUH58B50l7vOjnIdSPNv7R35pWCbf41hgeKK933W9sIblYHEvvT2C5mxink Message-ID: Subject: Re: Adding New Column with default value. To: Gambhir Singh Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000004e38ab0633daf29b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004e38ab0633daf29b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 28, 2025 at 10:25=E2=80=AFAM Gambhir Singh wrote: > > a. DDL statement (alter table add column) will be followed by the DML > statement (Update)....Am I correct ? > No. An alter command will either rewrite the table or it will not. It will never execute DML. David J. --0000000000004e38ab0633daf29b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 28, 2025 at 10:25=E2=80=AFAM Gambhir Singh <= ;gambhir.singh05@gmail.com= > wrote:

=C2=A0 a. DDL statement (alter table add column) will be foll= owed by the DML statement (Update)....Am I correct ?

No.=C2=A0 An alter=C2=A0command will either rewrite the= table or it will not.=C2=A0 It will never execute DML.

<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ">David J.

--0000000000004e38ab0633daf29b--