Re: Add pg_basetype() function to obtain a DOMAIN base type
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: John Naylor <johncnaylorls@gmail.com>,
Alexander Korotkov <aekorotkov@gmail.com>, Steve Chavez <steve@supabase.io>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-02-18T01:30:44Z
Lists: pgsql-hackers
On Sun, Feb 18, 2024 at 2:49 AM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote: > > An alternative approach would be modifying pg_typeof() to optionally > determine the base type, depending on a new argument which would default > to "false" (i.e. the current behavior). > > So you'd do > > SELECT pg_typeof(x); > > or > > SELECT pg_typeof(x, false); > > to get the current behavior, or and > > SELECT pg_typeof(x, true); > > to determine the base type. > > Perhaps this would be better than adding a new function doing almost the > same thing as pg_typeof(). But I haven't tried, maybe it doesn't work > for some reason, or maybe we don't want to do it this way ... > pg_typeof is quite hot. getting the base type of a domain is niche. changing pg_typeof requires extra effort to make it compatible with previous behavior. bundling it together seems not worth it.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add pg_basetype() function to extract a domain's base type.
- b154d8a6d0e5 17.0 landed