Re: Add pg_basetype() function to obtain a DOMAIN base type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add pg_basetype() function to obtain a DOMAIN base type
Дата
Msg-id 3738840.1708217258@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add pg_basetype() function to obtain a DOMAIN base type  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
Tomas Vondra <tomas.vondra@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: date_trunc function in interval version
Следующее
От: Andres Freund
Дата:
Сообщение: Re: PGC_SIGHUP shared_buffers?