pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Hanson <eric@aquameta.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: "name" vs "alias" in datatype table
Date: Wed, 29 Nov 2023 11:26:46 -0500
Message-ID: <308440.1701275206@sss.pgh.pa.us> (raw)
In-Reply-To: <CACA6kxixrAJoTt7MpUtbuT++JDifWiPQCLJ5YzFzpML2Pm-WYQ@mail.gmail.com>
References: <170077271331.398198.16997446522206025709@wrigleys.postgresql.org>
	<83419ce9-e2ba-46e9-aaff-f6bbe448a327@eisentraut.org>
	<CACA6kxjoGV+QxpvBa20Vdu+of3gxATWuot8FLSa1Sm2BfikN4w@mail.gmail.com>
	<CACA6kxixrAJoTt7MpUtbuT++JDifWiPQCLJ5YzFzpML2Pm-WYQ@mail.gmail.com>

Eric Hanson <eric@aquameta.com> 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





view thread (7+ messages)  latest in thread

Message-ID: <308440.1701275206@sss.pgh.pa.us>
Permalink:  ../308440.1701275206@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/308440.1701275206@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eric@aquameta.com, peter@eisentraut.org, pgsql-docs@lists.postgresql.org
  Subject: Re: "name" vs "alias" in datatype table
  In-Reply-To: <308440.1701275206@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox