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 1r8NOn-009ZPR-VD for pgsql-docs@arkaria.postgresql.org; Wed, 29 Nov 2023 16:26:53 +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 1r8NOm-00BiqQ-Mr for pgsql-docs@arkaria.postgresql.org; Wed, 29 Nov 2023 16:26:52 +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 1r8NOm-00Bim3-Cp for pgsql-docs@lists.postgresql.org; Wed, 29 Nov 2023 16:26:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8NOk-009CFv-1K for pgsql-docs@lists.postgresql.org; Wed, 29 Nov 2023 16:26:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3ATGQkvT308441; Wed, 29 Nov 2023 11:26:46 -0500 From: Tom Lane To: Eric Hanson cc: Peter Eisentraut , pgsql-docs@lists.postgresql.org Subject: Re: "name" vs "alias" in datatype table In-reply-to: References: <170077271331.398198.16997446522206025709@wrigleys.postgresql.org> <83419ce9-e2ba-46e9-aaff-f6bbe448a327@eisentraut.org> Comments: In-reply-to Eric Hanson message dated "Wed, 29 Nov 2023 09:16:57 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <308439.1701275206.1@sss.pgh.pa.us> Date: Wed, 29 Nov 2023 11:26:46 -0500 Message-ID: <308440.1701275206@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Eric Hanson writes: > The larger point being, the "name" vs "alias" paradigm presented in this > table does not accurately represent PostgreSQL, and conveys an inaccurate > picture of the relationship between type names. int4 is not an "alias". I agree that this could be improved, mainly because it's far from clear what the internal name of each type is (and there's at least one case where the internal name is not shown at all). I could see splitting this into three columns: 1. Preferred name (the standard's name, if it's a standard type) 2. Internal name (pg_type.typname), perhaps only if different from #1 3. Other aliases However, the table is already pretty wide and so adding another column might create formatting issues. AFAICS the only candidates for "other aliases" are char, int, and decimal. Maybe we could handle those another way than reserving a table column for them? We could give them their own table rows, or relegate them to footnotes. The "serial" types need a bit more reflection too, since they aren't truly types at all: there is no matching pg_type entry. I'm not sure they belong here. regards, tom lane