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 1tWBjO-00EpUp-3n for pgsql-admin@arkaria.postgresql.org; Fri, 10 Jan 2025 09:55:06 +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 1tWBjN-00ENAJ-5w for pgsql-admin@arkaria.postgresql.org; Fri, 10 Jan 2025 09:55:04 +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 1tWBjM-00EN9I-Q1 for pgsql-admin@lists.postgresql.org; Fri, 10 Jan 2025 09:55:04 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tWBjK-000rEd-1r for pgsql-admin@lists.postgresql.org; Fri, 10 Jan 2025 09:55:03 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-aaeef97ff02so314707866b.1 for ; Fri, 10 Jan 2025 01:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1736502901; x=1737107701; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=a5gVlGRjpSxRxFLIrPCEFc3onWPwRVpkINj2T0V56KY=; b=NMzNhMUOYayVhohkZlLiGvzHPV7d/zAcMtrmdbhVG6gLvsXZSj5k1OvFxU8hO++5aw VMi9jk5Znm0bZ1S58aDNw3bUZEfT+OJDk5DT8nCJSy+yTrQ4k9Rjti3WejrBlIB85r7q lHUHlFmENZ9GfZQdrkzA3AubVfGZWeH8ajsmM78NRl4PnCST/8wkRp3s0d0gyaX/QoJi pNjTHkH0z/un88Ae+rTc3mZQrCtpYidm7eT9Ri9HbYA5D379etBPLfaKjsRM1zZ/eBxz a3YoYvtFjJO/g3OMKF0DmjxhRFGmYjEgn90al3kT31QpDLqHzJUDdQvNgUcmSrmwcUCM u6FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736502901; x=1737107701; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=a5gVlGRjpSxRxFLIrPCEFc3onWPwRVpkINj2T0V56KY=; b=gFiEdmgissBKBu1dsPdQee79Uo1LzlC162jq834UsG+6f4CJQ1UvsloGIjclvzhwAj kDP6YDMfuN4x/qQIoh6fPAj+hK+1K7Rl9J151JwBsCcdFryvqIaI8c0TD79fKos7syrX UOpi8JE69yvV8aEP+yu1hAx6J+9qkBPaFiljs0EdVHgqduOR4H7NMj62jEYzWZed9o46 h2gjBQt/94P6ZMw1cdawo68CkzQSXMbxQ79SJOziGvuzjVJY5W+UP83wwUaUFWesCaBH B8hKG9xgsdXdoODDus/4o23s0bd0wwUMNvCBRLZBZVKbZAZw7kYaf8oa1ezhmomtghOs hTWg== X-Forwarded-Encrypted: i=1; AJvYcCUITiv1Y77FGCiNVJeszMBCl6nMnkPb1y9CAz3lDkPHREGde9lph16D9CNjUaqdMomUVj38R37MexSPiA==@lists.postgresql.org X-Gm-Message-State: AOJu0Yxpm6zPYEMWPRCgMdXHyN8K2qFNl2FKFiRYkhVUwKKrPOUsTHDh zUkGD+D4LhhUB6RwKCf44x0r6TEcMvlYnWmrZ4PR70kikoHLvBRF0keq4Ro00Q4= X-Gm-Gg: ASbGncupj6w7jVsJykj1fOAcLpZEBurOUWddjhMrHydoqDa4RvU9jhsG7p2W2G1oug+ YHSxUoSwdar00hK94ipbfXXK5TwvomM1/1bIGukTAh9VUGe6/4NSlbuMlrxTddNiKRERB/FMk/K 5JvVk9FcecmVO7gNfFGpTNPpry6m97V3ZTwR5d2hJaeF5LCJ8UfI2Mp1eZMJ/OCy0kJ2W4caGay qBdbKfAmo/uIoiGwq0p6G4EGL6Nng79Dz6WYpTmEw84ehdGT+cqQhCQtSnwMoxVls2ei9gDt68J X-Google-Smtp-Source: AGHT+IF2TooSf6fuUhVR+D7VRgnCYQJq+GFAZr0EiMJ3SJKnzB2lJ6SUTSdbZxGWsvDSbdTl/R57oQ== X-Received: by 2002:a17:906:ee85:b0:aa6:9372:cac7 with SMTP id a640c23a62f3a-ab2ab7120a8mr848500066b.31.1736502901195; Fri, 10 Jan 2025 01:55:01 -0800 (PST) Received: from localhost.localdomain ([2001:871:5e:e87d:b942:77f8:162e:c98a]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c9562551sm148814366b.123.2025.01.10.01.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 01:55:00 -0800 (PST) Message-ID: Subject: Re: Before image of selective columns. From: Laurenz Albe To: Gambhir Singh , pgsql-admin@lists.postgresql.org Date: Fri, 10 Jan 2025 10:55:00 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-01-10 at 15:20 +0530, Gambhir Singh wrote: > I got a request from my application team that they want the before image = of > selective columns when any delete occurs in DB. They will use this > information for some audit purposes. That looks like a job for a trigger; perhaps a statement level trigger with a transition table. Yours, Laurenz Albe