Re: "name" vs "alias" in datatype table - Mailing list pgsql-docs

From Tom Lane
Subject Re: "name" vs "alias" in datatype table
Date
Msg-id 308440.1701275206@sss.pgh.pa.us
Whole thread Raw
In response to Re: "name" vs "alias" in datatype table  (Eric Hanson <eric@aquameta.com>)
Responses Re: "name" vs "alias" in datatype table
Re: "name" vs "alias" in datatype table
List pgsql-docs
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



pgsql-docs by date:

Previous
From: "Euler Taveira"
Date:
Subject: Re: Clarification regarding CREATE TABLE LIKE and FOREIGN KEYS
Next
From: Alvaro Herrera
Date:
Subject: Re: "name" vs "alias" in datatype table