Re: safe to overload objectSubId for a type?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: safe to overload objectSubId for a type?
Date: 2019-09-02 04:29:55
Message-ID: 25373.1567398595@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:
> I don't mean "overload objectSubId" in any ObjectAddress that PG code
> would ever see. I am only thinking of a data structure of my own that
> is ObjectAddress-like and has all three components available all the
> time, and for an object that's a type, I would find it handy to stash
> a typmod there, and not have to carry those around separately.

If this is totally independent of ObjectAddress, why are you even
asking? I assume that what you mean is you'd like these values to
bleed into ObjectAddresses or vice versa.

If we ever do make ObjectAddress.objectSubId mean something for types,
I'd expect --- based on the precedent of relation columns --- that it'd
specify a column number for a column of a composite type. There are
fairly obvious use-cases for that, such as allowing a DROP of a column
type to not propagate to the whole composite type. So I'd be pretty down
on allowing it to mean typmod instead.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message r.takahashi_2@fujitsu.com 2019-09-02 04:42:55 pg_basebackup -F t fails when fsync spends more time than tcp_user_timeout
Previous Message Thomas Munro 2019-09-02 04:16:45 Re: POC: Cleaning up orphaned files using undo logs