Tomas Vondra <tomas.von...@enterprisedb.com> writes: > On 2/17/24 20:20, Tom Lane wrote: >> I don't have an immediate proposal for exactly what to call such a >> function, but naming it by analogy to pg_typeof would be questionable.
> Are you objecting to the pg_basetypeof() name, or just to it accepting > "any" argument? I think pg_basetypeof(regtype) would work ... I'm not sure. "pg_basetypeof" seems like it invites confusion with "pg_typeof", but I don't really have a better idea. Perhaps "pg_baseofdomain(regtype)"? I'm not especially thrilled with that, either. Also, just to be clear, we intend this to drill down to the bottom non-domain type, right? Do we need a second function that goes down only one level? I'm inclined to say "no", mainly because (1) that would complicate the naming situation even more, and (2) that use-case is pretty easy to handle with a sub-select. regards, tom lane