From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, John Naylor <johncnaylorls(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Steve Chavez <steve(at)supabase(dot)io>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add pg_basetype() function to obtain a DOMAIN base type |
Date: | 2024-02-18 00:47:38 |
Message-ID: | 3738840.1708217258@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2024-02-18 01:03:13 | Re: PGC_SIGHUP shared_buffers? |
Previous Message | Tomas Vondra | 2024-02-18 00:29:08 | Re: date_trunc function in interval version |