Re: TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]
Date: 2022-01-03 18:55:35
Message-ID: 3688140.1641236135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chapman Flack <chap(at)anastigmatix(dot)net> writes:
> On the same general topic, was there a deliberate choice to put
> inet and cidr in TYPCATEGORY_NETWORK but macaddr and macaddr8
> in TYPCATEGORY_USER?

Hard to say how "deliberate" it was, at this remove of time.

I do see an argument against reclassifying macaddr[8] into
TYPCATEGORY_NETWORK now: we generally expect that if a
category has a preferred type, any member type of the category
can be cast to that preferred type. (The fact that OID is
marked preferred breaks that rule, but it holds pretty well
otherwise.) I think this is why type interval has its own
category rather than being within TYPCATEGORY_DATETIME.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-03 19:05:48 Re: Remove inconsistent quotes from date_part error
Previous Message Ashwin Agrawal 2022-01-03 18:55:06 Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes