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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: jian he <jian.universality@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>, John Naylor <johncnaylorls@gmail.com>, Steve Chavez <steve@supabase.io>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-03-28T02:59:42Z
Lists: pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> I noticed psql \dD didn't return the basetype of a domain.
> one of the usage of this feature would be in psql \dD.

Your 0002 will cause \dD to fail entirely against an older server.
I'm not necessarily against adding this info, but you can't just
ignore the expectations for psql \d commands:

 * Support for the various \d ("describe") commands.  Note that the current
 * expectation is that all functions in this file will succeed when working
 * with servers of versions 9.2 and up.  It's okay to omit irrelevant
 * information for an old server, but not to fail outright.  (But failing
 * against a pre-9.2 server is allowed.)

			regards, tom lane



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add pg_basetype() function to extract a domain's base type.