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 1tEumK-00AP57-Gv for pgsql-general@arkaria.postgresql.org; Sat, 23 Nov 2024 18:22:44 +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 1tEumJ-002oWy-8I for pgsql-general@arkaria.postgresql.org; Sat, 23 Nov 2024 18:22:43 +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 1tEumI-002oWo-NW for pgsql-general@lists.postgresql.org; Sat, 23 Nov 2024 18:22:42 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tEumF-003PWK-Ra for pgsql-general@lists.postgresql.org; Sat, 23 Nov 2024 18:22:41 +0000 Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-83abf71f244so94430139f.1 for ; Sat, 23 Nov 2024 10:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732386158; x=1732990958; 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=CSyUZhNCsGv/52fsjlvwrm+lWCxvZSPAUpmPCXH13YM=; b=dTMCI/QzqV4VbMdqToD14tDfYY4547xjryMgdQLQKS0oc5XZHvOtYPB5QIgKHf8lQb YPsdWWxDwMiXCh6ZH1lmXa11tdNHAhq345gq/mMEDd9X1+mgIsSm0GNxvJaoH+HJl5e9 QjONf28+VQwBMZfM1ZKPb3L+xWsZFrPKZ26MIEFJCXHvIkOUOL8InZ+9D0vU0vTOOigQ 5G56uAn0BFZ8UD1UN5ygUWUynzcl9Xf31pXXajKLX99ZjFHMCQcoeffucRRF9gdnbqco 41MA1kXFc+GSMa7lF7ZY27LvAWs7f01Z6jU5lfXCBoKwnK7Nw6UCsHiKesTkLi2oUWz/ 8XMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732386158; x=1732990958; 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=CSyUZhNCsGv/52fsjlvwrm+lWCxvZSPAUpmPCXH13YM=; b=HBdVgdFMMcJWvezPbVjfB2PUI/2qqeIjxef1wRPkGXiLWGTBiM+227k3BjJxmt0Ml8 /F5aZ+1cZ/BVT3+/ryv5/Lv0Bm6MzWyN6OQmMgRslHvsgJowD3TLQw34DzxpNDTtgKed 2/yK8UHZRTyzXXW2pY5G9cMo4f4ozn72WKf/OmEpceK6R1mB3GpJYq7XdT/FXphygFCg BruUCo4lDGiBa+GJ6VPDqjwwktnEX9mG0zyJhKQVFaCLvQm9rmhM1hydpDAg+GsPDWGk R+uc1YunlaT5foVFDjY8rqxODZemv87IAb6D3wymoiZtJo5ncxMa0dqhZI9j+r9xT7iD axpw== X-Gm-Message-State: AOJu0YzdMAQNdqCDfrhsJZ75AjkSHYFbF0u+izKGLGzUyJxvcZlvXZ7l tEbSWCVTwI6/xumS1OgL4GeH2F5Ysdgha+XMpElgPa9dApvK4ILm5nNi/UiG5opR0H6GRWQG9Nh k1BdgWb1brVW51nkh1/F9h9tMDs4= X-Gm-Gg: ASbGncs6IdXLMysGNGFidGUiz+LdboiJhKLNzTzTbyosc048A/pnBWFv3OZDY19lXYU ZCi9GIy6YF1s3bOqH4qHu7/WWZFuvvV4= X-Google-Smtp-Source: AGHT+IFvXfx3smN1h9kHWbCCjQABuZ52e3sDBwblLcR1q292+i+ZQGTLQk5RDcx0TIyMhOcSLxT562CNsb4yD6OKfJ8= X-Received: by 2002:a05:6602:2cd2:b0:83b:7164:ebb4 with SMTP id ca18e2360f4ac-83ecdd13818mr726174939f.14.1732386158349; Sat, 23 Nov 2024 10:22:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Sat, 23 Nov 2024 13:22:02 -0500 Message-ID: Subject: Re: Question About Native Support for SQL:2011 Temporal Tables in PostgreSQL To: David Lynam Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000009519c90627989541" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009519c90627989541 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 11, 2024 at 6:23=E2=80=AFAM David Lynam wrote: > Are there any plans or discussions about adding native support for > SQL:2011 temporal tables, so we don=E2=80=99t need extensions? No concrete plans I've heard of (but see below). For the record, "so we don't need extensions" is not a winning argument. Postgres is designed to be extensible. > What are the main reasons behind needing an extension for this feature? Is it tough to build directly into PostgreSQL=E2=80=99s core? By default, Postgres focuses on safely storing and retrieving your data in a relational database system. Having to use extensions to go beyond this in various ways is considered a feature, not a limitation. Things do eventually make it into core, but there are a number of prereqs that need to happen first. Being "tough" technically is only part of the equation. Other things, off the top of my head: * is it something many people will benefit from? * is it something that will not impact the people not using it? * how will it interact with other parts of the system? * is it worth the added lines of code, complexity, and maintenance costs? * is it already handled quite well as an extension? * are there resources (i.e. people) available to champion it and maintain it in perpetuity? For those who can=E2=80=99t use extensions (like on AWS RDS), is it practic= al to > build temporal table features using only RAW SQL. I'm aware of the Nearfo= rm > trigger solution but I'd really love the syntactical sugar "with SYSTEM > VERISON" gives? If so, are there any best practices or tips for recreatin= g > some of that extension-like functionality? I cannot speak to Nearform et. al., but for the record here, AWS RDS does support extensions - and a lot of them. No, you cannot install your own custom extensions, but that's the tradeoff for using a managed service. Since you are paying them money, however, you can certainly ask if they will make particular extensions available. Having native temporal table support would be a huge help for users needing > built-in tools for audits, historical tracking, and meeting data complian= ce > needs. I think adding these features natively could make PostgreSQL even > more powerful and flexible for different use cases. It's certainly been discussed over the years. Nobody denies it can be useful, but putting things in core is a high bar. You can always argue your case on pgsql-hackers > I've been looking into https://github.com/xocolatl/periods but I can't tell if its an extension or part of the regular deployment. Looks like an extension to me. Cheers, Greg --0000000000009519c90627989541 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Nov 11, 2024 at 6:23=E2=80=AFAM David Lynam <davidlynam1@hotmail.co.uk>= ; wrote:
Are there any= plans or discussions about adding native support for SQL:2011 temporal tab= les, so we don=E2=80=99t need extensions?

No concrete plans= I've heard of (but see below). For the record, "so we don't n= eed extensions" is not a winning argument. Postgres is designed to be = extensible.

> What are the main reasons behind needing an extensi= on for this feature? Is it tough to build directly into PostgreSQL=E2=80=99= s core?

By default, Postgres focuses on safely storing and retrievin= g your data in a relational database system. Having to use extensions to go= beyond this in various ways is considered a feature, not a limitation. Thi= ngs do eventually make it into core, but there are a number of prereqs that= need to happen first. Being "tough" technically is only part of = the equation. Other things, off the top of my head:

* is it som= ething many people will benefit from?
* is it something that will not im= pact the people not using it?
* how will it interact with other parts o= f the system?
* is it worth the added lines of code, complexity, and mai= ntenance costs?
* is it already handled quite well as an extension?
*= are there resources (i.e. people) available to champion it and maintain it= in=C2=A0perpetuity?

For those who can=E2=80=99t use extensions (like on AWS RDS), is it prac= tical to build temporal table features using only RAW SQL. I'm aware of= the Nearform trigger solution but I'd really love the syntactical suga= r "with SYSTEM VERISON" gives? If so, are there any best practice= s or tips for recreating some of that extension-like functionality?
I cannot speak to Nearform et. al., but for the record here, AWS R= DS does support extensions - and a lot of them. No, you cannot install your= own custom extensions, but that's the tradeoff for using a managed ser= vice. Since you are paying them money, however, you can certainly ask if th= ey will make particular extensions available.

Having native temporal table support would be = a huge help for users needing built-in tools for audits, historical trackin= g, and meeting data compliance needs. I think adding these features nativel= y could make PostgreSQL even more powerful and flexible for different use c= ases.

It's certainly been discussed over the= years. Nobody denies it can be useful, but putting things in core is a hig= h bar. You can always argue your case on pgsql-hackers

=
> I've been looking into https://github.com/xocolatl/periods but I can't tell if i= ts an extension or part of the regular deployment.

Looks like an ext= ension to me.

Cheers,
Greg
--0000000000009519c90627989541--