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 1sP65p-002rb8-DU for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 19:56:41 +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 1sP65n-00Brvy-Es for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 19:56:40 +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 1sP65n-00Brsj-4s for pgsql-general@lists.postgresql.org; Wed, 03 Jul 2024 19:56:39 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP65l-000Go3-Qv for pgsql-general@lists.postgresql.org; Wed, 03 Jul 2024 19:56:39 +0000 Message-ID: Date: Wed, 3 Jul 2024 22:56:33 +0300 MIME-Version: 1.0 Subject: Re: Description field for tables and views To: pgsql-general@lists.postgresql.org References: <341b85fb-0085-95ea-1177-fc96944295e2@gmail.com> Content-Language: en-US From: Achilleas Mantzios In-Reply-To: <341b85fb-0085-95ea-1177-fc96944295e2@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Στις 3/7/24 22:28, ο/η Kent Dorfman έγραψε: > I think I already know the answer but asking here is probably quicker > turnaround than researching it. > > I've gotten into a "view bloat" scenario with many many custom views > that I cannot remember what they actually do.  Is there any psql > function/command to add a description field to a table or view > definition in the system?  Would be nice to have a one line general > text note capability to quickly see what a complicated view does when > looking at the defintion via > # \dv+ > > Looks like the command has the field present, but not sure how to > populate it. > > am using PostgreSQL 13.xx in Debian. In addition to the COMMENT advised by PostgreSQL friends above, you might put your schema into some version control system, such as git, so you can have all the info : why something was added/changed, by whom, what for, etc. > > -- Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt (as agents only)