Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijqA2-0007XT-Lf for pgsql-general@arkaria.postgresql.org; Tue, 24 Dec 2019 19:48:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ijqA0-0000dS-Tj for pgsql-general@arkaria.postgresql.org; Tue, 24 Dec 2019 19:48:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijqA0-0000dK-HQ for pgsql-general@lists.postgresql.org; Tue, 24 Dec 2019 19:48:04 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ijq9w-000155-9r for pgsql-general@lists.postgresql.org; Tue, 24 Dec 2019 19:48:03 +0000 Received: by mail-ot1-x32e.google.com with SMTP id d7so22927598otf.5 for ; Tue, 24 Dec 2019 11:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=WwZw/h8oVaPXqeyZuh2IwND5/OhK43p3rnohE5EvuvU=; b=t73FakbwPCDJ//3ULFPKVVKde6yf/L6qyHPjyYCQNYC3QxtAQ1y5+cTf7E1CWqNhOh zN3eNPmlf/v+ytnQqIJy81DH8MWXq8BFDZXI8EsEUXFDjRg+xB/4BhyB6VB3z/mGIYhq lN2Z/YaGiTxaP6iejJOf7aqmfgVl62wXoGUbS1v+Byi7fQ8EI9X1cClr9k+Oq+YOwgs1 sdy6rllq43swmVPC99COmToQP+1dROyxfezTvp+t7PFo/vmNQh17xX7Nl0+16eJIKjwB KMDCq9aiVSK/aafRzSt1Fd/luokuYWaQsPyArKxDTu0OEeV9lD6ywyWk2LDyafBVhKVE +0Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=WwZw/h8oVaPXqeyZuh2IwND5/OhK43p3rnohE5EvuvU=; b=IOmRsdWF1CkPilQbW9gj/ziSVQ0TJ4Z/Cbp2LTObVdMNYvdjvrlTn7IsVAc3Vq8kkP ohDoBH8LBLPyP4Gc33zk73k0VRE0uN/mDzctWwgrpxTcpPrHjivBBi+RrE6ibWiOkIrm z+QK4llV2PWd8ZxjixNPXBOZrGnTBgysWW31Z4zjoJNBtxNki7GebgZyOHNTFQc6l//b pKzD6gD7eOexVPBQ8Hita6o4ym0c2gS6w71gplTryqWiiEmxV+QwEiKkc0LxUfVt+DH9 TshE7ngTVQJs5+o9DpwtBNfzzu+A43wWVQysHO/O/B5xEvBbMU0zVdS2tmDXJpZ1seRG cpjg== X-Gm-Message-State: APjAAAWpw3vopy19TOO0imRGas866Rr2rBsNWbzCheCuRdVN7ZbjWj46 S8C9tdoJP8GAO1MRA0QdYxe2L6GYk5s= X-Google-Smtp-Source: APXvYqy3YQdh+QJOdRFC368ufkwz5GZjevH/PJ35iscniFtMPvLLRoJ9Ng6C15+Jgu6kjk9xL74QUA== X-Received: by 2002:a9d:ed5:: with SMTP id 79mr40597794otj.72.1577216878101; Tue, 24 Dec 2019 11:47:58 -0800 (PST) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id l17sm8931826ota.27.2019.12.24.11.47.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Dec 2019 11:47:57 -0800 (PST) Subject: Re: Date created for tables To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <92b8607a-089b-f553-1808-e8385b8d0d27@gmail.com> Date: Tue, 24 Dec 2019 13:47:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------5E1CDD35D27EB3397FF00EB5" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------5E1CDD35D27EB3397FF00EB5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 12/24/19 1:14 PM, Rob Sargent wrote: >> If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place. We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner. >> >> But that's not what y'all said. "It's too complicated, mission creep, blah blah blah" just extended way too long. > Is there a list of purported uses cases for these two attributes (other than auditing)? Especially anything to do with managing the data as they currently exist? I've used last_altered for comparing tables on Staging and Prod database. If, for example, the last_altered on a prod table is *earlier* than last_altered on the staging table, then that's a *strong hint* that the staging and prod schema are out of sync, and more detailed examination is required. Another example is that -- since username is also recorded in other RDBMSs --it's useful when the customer is screaming at your boss asking who made that unauthorized modification to production that's breaking their application.  You then show them that the table hasn't been altered in X months, and point the finger back at their incompetent developers. All in all, it's not something that you use every day, but when it *is* useful, it's *very* useful. -- Angular momentum makes the world go 'round. --------------5E1CDD35D27EB3397FF00EB5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 12/24/19 1:14 PM, Rob Sargent wrote:
If there's not enough time and motivation for the developers to implement CREATED_ON and LAST_ALTERED in pg_class, then you should have said that in the first place.  We're adults; we understand that OSS projects have limited resources, and won't go off and pout in the corner.

But that's not what y'all said.  "It's too complicated, mission creep, blah blah blah" just extended way too long.

        
Is there a list of purported uses cases for these two attributes (other than auditing)?  Especially anything to do with managing the data as they currently exist? 

I've used last_altered for comparing tables on Staging and Prod database. 

If, for example, the last_altered on a prod table is earlier than last_altered on the staging table, then that's a strong hint that the staging and prod schema are out of sync, and more detailed examination is required. 

Another example is that -- since username is also recorded in other RDBMSs --it's useful when the customer is screaming at your boss asking who made that unauthorized modification to production that's breaking their application.  You then show them that the table hasn't been altered in X months, and point the finger back at their incompetent developers.

All in all, it's not something that you use every day, but when it is useful, it's very useful.

--
Angular momentum makes the world go 'round.
--------------5E1CDD35D27EB3397FF00EB5--